Project

General

Profile

Bug #16763

dashboard errata widget performs large/slow sort in sql

Added by Chris Duryee almost 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

On a system with lots of errata and hosts, the errata dashboard widget can take upwards of 90 seconds to load. This depends on the size of `katello_content_facet_errata`, and the size of the largest errata's description/summary/solution text.

If the join between the errata and the content facets is larger than work_mem, the sort will need to be done on-disk, resulting in extremely slow dashboard load time. work_mem should not be increased if possible, as it is used for each query and subquery.

Associated revisions

Revision 7bb6ee18 (diff)
Added by Chris Duryee almost 3 years ago

Fixes #16763: do not sort over entire `katello_errata.*`

The dashboard's errata widget had a query that sorted over
`katello_errata.*`. Instead, use `DISTINCT ON` to sort only on `id`
and `updated`.

This is similar to 4667141bf. That patch was backed out in favor of
42502063, this patch re-adds the same optmization but in a smaller
dashboard-specific scope.

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6365 added

#2 Updated by Chris Duryee almost 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Justin Sherrill almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 162

Also available in: Atom PDF