add cached count fields to avoid expensive COUNT queries#757
Merged
Conversation
Owner
furlongm
commented
Feb 11, 2026
- Add sec_updates_count, bug_updates_count, packages_count, errata_count to Host
- Add packages_count to Mirror
- Add hosts_count to OSVariant
- Add Django signals to auto-update counts on M2M/FK changes
- Update views to use cached fields instead of annotations
- Add sec_updates_count, bug_updates_count, packages_count, errata_count to Host - Add packages_count to Mirror - Add hosts_count to OSVariant - Add Django signals to auto-update counts on M2M/FK changes - Update views to use cached fields instead of annotations
71a2e9b to
9750cfb
Compare
Contributor
There was a problem hiding this comment.
Some things to consider. View full project report here.
f29d01a to
a2ee6e2
Compare
Contributor
There was a problem hiding this comment.
Some food for thought. View full project report here.
a2ee6e2 to
e90de15
Compare
Contributor
There was a problem hiding this comment.
Looks good. Worth considering though. View full project report here.
e90de15 to
0376909
Compare
Contributor
There was a problem hiding this comment.
Worth considering. View full project report here.
0376909 to
3f4cb69
Compare
Contributor
There was a problem hiding this comment.
Worth considering. View full project report here.
d4ed139 to
a9bc4ae
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.