fwbrasil / activate

Abandoned: Pluggable persistence in Scala
GNU Lesser General Public License v2.1
299 stars 46 forks source link

numberOfResults causing performance issue with PaginationNavigator #173

Open spry-rproud opened 9 years ago

spry-rproud commented 9 years ago

paginatedQuery is slowed down quite a bit by the query used to populate numberOfResults. The current query generated is :

select '1' from Foo where (...)

With large tables this query is quite slow and would be improved with:

select count(1) from Foo where (...)

This will require counting support in Activate.