2x speedup in large queries