Bug 1101817
| Summary: | [SLOW QUERY] Main system activity page | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Raymond Mancy <rmancy> |
| Component: | web UI | Assignee: | Dan Callaghan <dcallagh> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 0.15 | CC: | aigao, asaha, dcallagh, dowang |
| Target Milestone: | 20.0 | Keywords: | Patch |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-04-20 02:22:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Raymond Mancy
2014-05-28 02:58:04 UTC
This query is being issued by turbogears.paginate module. It does a count() before any pagination (i.e LIMIT) clauses are added to the query. As can be seen, this query does not run all that often (total of 11 times) but it is very very slow. Perhaps we could look at always requiring some kind of filter for this page. I would prefer to just skip showing a total number of rows or total number of pages in this case. So we avoid the COUNT() query, but users aren't forced to search before they can see anything. Actually this will be quite difficult to fix without either patching TurboGears (or forking TG @paginate into Beaker and then modifying it). In its current incarnation, there is no way to tell @paginate to avoid issuing the COUNT() query. Having ported the activity pages to use Backgrid, this patch removes the count from those grids which are likely to accumulate a very large number of rows: http://gerrit.beaker-project.org/4022 Steps to reproduce: 1. Open the system activity page (Activity -> System from the menu). Expected results: The page should load in a reasonable amount of time (< 10 seconds). The total number of results found will *not* be shown on this page, because calculating it is too expensive (that's the bug). Suggested test cases: We have ported all the activity pages to use Backgrid now, with different code for searching and for producing the grid data. We have addresses all the poorly performing queries that we could find, which included this one. It should be possible to open all the different activity pages and browse through them and perform simple searches, with the results loaded in a reasonable amount of time. Some searches will be slower than others but none should take long enough to enter the slow query log (> 10 seconds). Beaker 20.0 has been released. |