We've got a query timing out on the Bugs front page. The query was ordered by datecreated, with id as a tie-breaker. It's good for determinacy to have such a tie-breaker, but there was only an index on datecreated. The query itself would run in a fraction of a millisecond, but the sorting could take several seconds.
This branch adds an index on (datecreated, id). As a result, this particular query needs no sorting at all.
= Bug 518965 =
We've got a query timing out on the Bugs front page. The query was ordered by datecreated, with id as a tie-breaker. It's good for determinacy to have such a tie-breaker, but there was only an index on datecreated. The query itself would run in a fraction of a millisecond, but the sorting could take several seconds.
This branch adds an index on (datecreated, id). As a result, this particular query needs no sorting at all.
Jeroen