Project

General

Profile

Bug #28427

Content view versions list has slow query for package count

Added by Partha Aji 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Customer has over 9 million rows in their katello_repository_rpms. Checking for content view version list takes much longer than anticipated.
We need to cache to the content counts for a content view version when creating it and have content view version list piggy back of that cache.
We could add a counts with a serializable json to store this information.

Four parts to the story

1) Create a serializable column to store the content counts for a content view version
2) Store the content view counts when the content view is created
3) Make the content view version list use the content counts
4) Write a db migration script to setup the content counts

Associated revisions

Revision b2c46015 (diff)
Added by Partha Aji 4 months ago

Fixes #28427 - Caches counts in a CVV (#8468)

Content view versions list api ran a count query for every content type
belonging to a content view. This means atleast 10 queries for each
content type and can get out of hand when one is returning over 40
versions in a list api call

This commit addresses the above issue by storing the counts in a
serializable hash for each content view version on every publish and
that cached result is returned when content_counts is called.
This should result in a speed up in the api response

History

#1 Updated by Partha Aji 4 months ago

  • Category set to Content Views

#2 Updated by Partha Aji 4 months ago

  • Bugzilla link set to 1486446

#3 Updated by The Foreman Bot 4 months ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8468 added

#4 Updated by James Jeffers 4 months ago

  • Target version set to Katello 3.15.0

#5 Updated by Jonathon Turel 4 months ago

  • Triaged changed from No to Yes

#6 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases Katello 3.15.0 added

#7 Updated by Partha Aji 4 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF