paginatedQuery is slowed down quite a bit by the query used to populate numberOfResults. The current query generated is : ``` sql select '1' from Foo where (...) ``` With large tables this query is quite slow and would be improved with: ``` sql select count(1) from Foo where (...) ``` This will require counting support in Activate.