-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AO3-6592 Optimize the database query for the series count in the user…
… sidebar (#4725) * AO3-6592 Add test for correct counts * AO3-6592 Optimize getting the count * AO3-6592 Optimize series for_pseuds * Rubocop * AO3-6592 Add pseud with no series to test * AO3-6592 Split series for_pseuds scope into user and pseud Based on the EXPLAIN, the database is not clever enough to get rid of the extra select for the user pseuds. And for the pseud case, the JOIN is generally unnecessary.
- Loading branch information
Showing
4 changed files
with
71 additions
and
26 deletions.
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
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