Allow COUNT(*) query to be disabled for pagination queries #394
Labels
proposal
A suggestion for a change, feature, enhancement, etc
s: accepted
This proposal was accepted. Someone can start working on it.
Milestone
Currently, a COUNT(*) query is executed after any query that includes pagination. This can be a problem when the table being queried is very large. Due to how the query is executed; a derived table is constructed from source being queried against, which can cause serious query performance issues depending on the size of the table.
Reproduce this issue by running a paginated query against a very large table.
There should be an option somewhere that disables running COUNT(*) for paginated queries. I'm looking for some guidance as to where would be the best place to make this change. My initial thought is to add an unexported field named deferStatsCollection to the Paginator struct. An exported method would be defined to enable setting this flag. When true, no query stats would be collected that are used to populate the Paginator struct after the query (no COUNT(*) query being run).
pop v4.10.0
The text was updated successfully, but these errors were encountered: