Handle large queries