Actions
Bug #15253
closeddistinct used when finding applicable errata, causing severe slowdowns on dashboard
Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Description
If you have >250 content hosts and >400 errata, the dashboard may take multiple minutes to load. It is due to this query:
DISTINCT "katello_errata".* FROM "katello_errata" INNER JOIN "katello_content_facet_errata" ON "katello_content_facet_errata"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_content_facet_errata" "content_facet_errata_katello_errata_join" ON "content_facet_errata_katello_errata_join"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_content_facets" ON "katello_content_facets"."id" = "content_facet_errata_katello_errata_join"."content_facet_id" WHERE "katello_content_facets"."host_id" IN ( SELECT "hosts"."id" FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."organization_id" IN (1)) ORDER BY updated DESC limit 6;
note the "distinct" at the beginning, it causes a very large sort to happen!
-> Sort (cost=50522.02..50628.22 rows=42483 width=1269) (actual time=63211.686..79656.391 rows=42483 loops=1) Sort Key: katello_errata.updated, katello_errata.id, katello_errata.uuid, katello_errata.errata_id, katello_errata.created_at, katello_errata.updated_at, katello_errata.issued, katello_errata.errata_type, katello_errata.se verity, katello_errata.title, katello_errata.solution, katello_errata.description, katello_errata.summary, katello_errata.reboot_suggested Sort Method: external merge Disk: 36304kB
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6094 added
Updated by Chris Duryee over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|4667141bff31d8781600a19977f1d529e0218b5b.
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release set to 144
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release changed from 144 to 143
Actions