Bugtask:+index loads all messages to determine if the description was edited

Bug #721056 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Robert Collins

Bug Description

this is show in OOPS-1875C65 - the query plan

 Limit (cost=679066.78..679066.78 rows=1 width=319)
   -> Sort (cost=679066.78..679070.49 rows=1485 width=319)
         Sort Key: public.bugmessage.index, message.datecreated, message.id
         -> Hash Left Join (cost=573939.34..679059.36 rows=1485 width=319)
               Hash Cond: (message.parent = parent_message.id)
               -> Nested Loop (cost=0.00..13842.55 rows=1485 width=179)
                     -> Index Scan using bugmessage__bug__message__key on bugmessage (cost=0.00..3568.31 rows=1485 width=39)
                           Index Cond: (bug = 1)
                     -> Index Scan using message_pkey on message (cost=0.00..6.91 rows=1 width=140)
                           Index Cond: (message.id = public.bugmessage.message)
               -> Hash (cost=427166.90..427166.90 rows=4446595 width=140)
                     -> Seq Scan on message parent_message (cost=3572.02..427166.90 rows=4446595 width=140)
                           Filter: (hashed SubPlan 1)
                           SubPlan 1
                             -> Index Scan using bugmessage__bug__message__key on bugmessage (cost=0.00..3568.31 rows=1485 width=4)
                                   Index Cond: (bug = 1)

is due to the loading of the parent messages which is not actually interesting for this case at all.

Tags: qa-ok timeout

Related branches

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Robert Collins (lifeless)
milestone: none → 11.03
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Revision history for this message
Robert Collins (lifeless) wrote :

7.6 seconds cold on qastaging, 5.34 seconds hot. booyah.

tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Robert Collins (lifeless) wrote :

Bug 1 down to 486 queries/external actions issued in 7.24 seconds hot, 10 seconds cold on prod. Not as dramatic as staging but still pretty good. Given we're in overload on prod at the moment, quite satisfactory.

Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.