~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bug.py

  • Committer: Robert Collins
  • Date: 2011-02-22 07:36:55 UTC
  • mto: This revision was merged to the branch mainline in revision 12428.
  • Revision ID: robert@canonical.com-20110222073655-xlsndilawl3ut8dv
Use simpler sort in Bug._indexed_messages now that index is fully populated. Saves 90% on some queries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
534
534
                BugMessage.bugID == self.id,
535
535
                BugMessage.messageID == Message.id,
536
536
                )
537
 
        results.order_by(BugMessage.index, Message.datecreated, Message.id)
 
537
        results.order_by(BugMessage.index)
538
538
        return DecoratedResultSet(results, index_message,
539
539
            pre_iter_hook=eager_load)
540
540