Commit graph

2 commits

Author SHA1 Message Date
Bob Van Landuyt
5a335c4d95 Remove the selects when counting the last page
The last page of the first collection is only loaded into memory when
it is being viewed. If it isn't loaded into memory, the `#size` call
triggers a count query.

This `#count` would generate an invalid query if our custom preloaded
counts are included by adding a separate `as count_column` alias on
top of the count aliases. Removing the selects in this case will make
sure a valid `COUNT(*)` is generated.
2017-11-17 16:20:47 +01:00
Bob Van Landuyt
dda023d66d Optimize queries and pagination in GroupDescendantsFinder 2017-10-05 11:10:57 +02:00