Project

General

Profile

Bug #15233

Updated by Chris Duryee over 8 years ago

As the `katello_repository_rpms` table grows, the CVV page gets slower and slower. For example, this query can take 300+ msec: 

 <pre> ``` 
 LOG:    duration: 329.058 ms    execute a36: SELECT COUNT(*) FROM "katello_rpms" INNER JOIN "katello_repository_rpms" ON "katello_repository_rpms"."rpm_id" = "katello_rpms"."id" WHERE "katello_repository_rpms"."repository_id" IN (SELECT "katello_repositories"."id" FROM "katello_repositories"    WHERE "katello_repositories"."content_view_version_id" = $1 AND (environment_id is NULL)) 

 </pre> ``` 

 This is run once for every CVV on the page.

Back