-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve question count query performance with vote
The query was really slow, as we needed a seqscan to know the exact count of insights following the criteria, including the vote criterion. The count could be really high (ex: on https://hunger.openfoodfacts.org/questions we have 1.5M insights). By limiting to 100, we dramatically reduce query performance.
- Loading branch information
1 parent
15e6cfb
commit f19d49a
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters