launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #03525
[db queries] some query observations during oops analysis
I'm looking into an OOPS for a slow rendering page. It happens to be a branch
index page with a whole heap of linked bugs.
(https://lp-oops.canonical.com/oops.py/?oopsid=1594B2178)
I've noticed a number of things on initial analysis:
* There seem to be six select queries to get the branch. Still digging on
that one
- eye-balling the actual page leads me to think that we should only be
doing this branch query once.
* There are two queries for every bug to get the bug tasks. I believe this
is what we use to get the correct task so we can show the importance coloured
bug icon. Partly due to the problem that branches are connected to bugs and
not bug tasks. However again not sure why this is being called twice.
* The queries to get the branch details using the primary key took averaged
just under 500ms each (WTF?)
- a more detailed check shows most in the 3-11ms range, but two outliers:
2294ms and 639ms these two blowing the average somewhat.
* There are 20 DB queries and 150ms of time before we even get to the object
traversal
Tim
Follow ups