Added page size optimizations for querying

USERGRID-1046