Bug #8954
closedToo many queries to list products - Satellite 6 - Slow Response Time
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1171173
Description of problem:
When adding many products with many repos, listing the products performs too many queries which creates a slow response time for the API/UI.
Version-Release number of selected component (if applicable):
6.0.4
How reproducible:
Always
Steps to Reproduce:
1. Add 8 custom products
2. Add 21 repos per product
3. Sync repos (Not sure if this is necessary to reproduce)
4. time hammer product list --organization-id 1
- time h product list --organization-id 1
---|---------------------|-------------|----------------------|--------------|-----------
ID | NAME | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC STATE
---|---------------------|-------------|----------------------|--------------|-----------
2 | perf-gen1 | | Default_Organization | 21 | finished
5 | perf-gen4 | | Default_Organization | 21 | finished
8 | perf-gen7 | | Default_Organization | 21 | finished
3 | perf-gen2 | | Default_Organization | 21 | finished
6 | perf-gen5 | | Default_Organization | 21 | finished
9 | perf-gen8 | | Default_Organization | 21 | finished
1 | perf-puppet-modules | | Default_Organization | 1 | not_synced
4 | perf-gen3 | | Default_Organization | 21 | finished
7 | perf-gen6 | | Default_Organization | 21 | finished
---|---------------------|-------------|----------------------|--------------|-----------
real 0m26.469s
user 0m2.318s
sys 0m0.526s
x 3 more:
0m26.022s
0m26.822s
0m25.895s
Expected results:
<3s to display 8 products, the number of associated repos and whether or not they have been synced.
Additional info:
The issue appears to be rooted with the shear number of queries to list the products:
$ grep i "select" production*.log c*.log -c
production-hammer.log:2123
production-ui.log:2122
$ grep -i "cache" production
production-hammer.log:1537
production-ui.log:1535
Counting cached queries, we have 2123 queries to perform this.
Updated by The Foreman Bot about 10 years ago
- Status changed from New to Ready For Testing
- Target version set to 63
- Pull request https://github.com/Katello/katello/pull/4928 added
- Pull request deleted (
)
Updated by Eric Helms about 10 years ago
- Translation missing: en.field_release set to 23
- Triaged changed from No to Yes
Updated by Justin Sherrill almost 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|11eea88663ef47def9d0254a01ac07463dc24b09.