Code review comment for lp:~gmb/launchpad/fix-b.l.n-timeouts-bug-517798

Revision history for this message
Graham Binns (gmb) wrote :

This branch fixes the timeouts on the Malone front page (see bug 517798). The timeouts were caused because we were (unnecessarily) ordering the results of the latest bugs query by (datecreated, id). Since this combination has no index it took far longer to order the result set than by just using datecreated, even though the results were the same (because datecreated and id advance together; it's very rare that two bugs have the same datecreated and even if they do we don't care all that much for the sake of the list of latest bugs).

The fix for this is to remove 'id' from the orderBy clause of the offending query. I've updated the pagetest for the Malone frontpage, which was the only test affected by this change.

This fix has already been cowboyed to production and edge; it needs to land on devel so that it will be rolled out without edge breaking again.

« Back to merge proposal