Macrodb: Scaling database engines on multicores