Actions
Bug #23270
closedslow query when updating content facet applicability counts
Description
When there are a lot of hosts and a lot of rpms, this query can be slow:
SELECT COUNT(*) FROM "katello_rpms" INNER JOIN "katello_content_facet_applicable_rpms" ON "katello_rpms"."id" = "katello_content_facet_appl
icable_rpms"."rpm_id" WHERE "katello_content_facet_applicable_rpms"."content_facet_id" = $1 [["content_facet_id", 51438]]
it is generated by:
def update_applicability_counts self.update_attributes!( :installable_security_errata_count => self.installable_errata.security.count, :installable_bugfix_errata_count => self.installable_errata.bugfix.count, :installable_enhancement_errata_count => self.installable_errata.enhancement.count, :applicable_rpm_count => self.applicable_rpms.count, :upgradable_rpm_count => self.installable_rpms.count ) end
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7309 added
Updated by Justin Sherrill over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|9920678b8c32ff1ff6e2cff3a427ce6bbf165da9.
Updated by Justin Sherrill over 6 years ago
- Related to Bug #23296: Index name 'index_katello_content_facet_applicable_rpms_on_content_facet_id' on table 'katello_content_facet_applicable_rpms' is too long; the limit is 62 characters added
Updated by Justin Sherrill over 6 years ago
- Translation missing: en.field_release set to 338
Actions