+affectingbugs times out

Bug #868021 reported by Martin Pool
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Critical
Unassigned

Bug Description

split out from bug 866100: https://bugs.launchpad.net/~/+affectingbugs times out, with eg OOPS-2104A6 and the last active query is

SELECT BugTask.assignee, BugTask.bug, BugTask.bugwatch, BugTask.date_assigned, BugTask.date_closed, BugTask.date_confirmed, BugTask.date_fix_committed, BugTask.date_fix_released, BugTask.date_incomplete, BugTask.date_inprogress, BugTask.date_left_closed, BugTask.date_left_new, BugTask.date_triaged, BugTask.datecreated, BugTask.distribution, BugTask.distroseries, BugTask.heat, BugTask.id, BugTask.importance, BugTask.milestone, BugTask.owner, BugTask.product, BugTask.productseries, BugTask.sourcepackagename, BugTask.status, BugTask.targetnamecache, Bug.date_last_message, Bug.date_last_updated, Bug.date_made_private, Bug.datecreated, Bug.description, Bug.duplicateof, Bug.heat, Bug.heat_last_updated, Bug.id, Bug.latest_patch_uploaded, Bug.message_count, Bug.name, Bug.number_of_duplicates, Bug.owner, Bug.private, Bug.security_related, Bug.title, Bug.users_affected_count, Bug.users_unaffected_count, Bug.who_made_private FROM BugTask LEFT JOIN Product ON BugTask.product = Product.id AND Product.active JOIN Bug ON BugTask.bug = Bug.id WHERE Bug.id = BugTask.bug AND ((BugTask.status = 10) OR (BugTask.status = 15) OR (BugTask.status = 20) OR (BugTask.status = 21) OR (BugTask.status = 22) OR (BugTask.status = 25)) AND Bug.duplicateof is NULL AND (Bugtask.product IS NULL OR Product.active = TRUE) AND
 BugTask.id IN (
 SELECT BugTask.id FROM BugTask, BugAffectsPerson
 WHERE BugTask.bug = BugAffectsPerson.bug
 AND BugAffectsPerson.person = 1935300
 AND BugAffectsPerson.affected = TRUE
 )
 AND
 (Bug.private = FALSE OR EXISTS (
 SELECT BugSubscription.bug
 FROM BugSubscription, TeamParticipation
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = BugSubscription.person AND
 BugSubscription.bug = Bug.id
 UNION
 SELECT BugTask.bug
 FROM BugTask, TeamParticipation
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = BugTask.assignee AND
 BugTask.bug = Bug.id

 UNION
 SELECT BugTask.bug
 FROM BugTask, TeamParticipation, Product
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = Product.owner AND
 BugTask.product = Product.id AND
 BugTask.bug = Bug.id AND
 Bug.security_related IS False
 UNION
 SELECT BugTask.bug
 FROM BugTask, TeamParticipation, ProductSeries
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = ProductSeries.owner AND
 BugTask.productseries = ProductSeries.id AND
 BugTask.bug = Bug.id AND
 Bug.security_related IS False
 UNION
 SELECT BugTask.bug
 FROM BugTask, TeamParticipation, Distribution
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = Distribution.owner AND
 BugTask.distribution = Distribution.id AND
 BugTask.bug = Bug.id AND
 Bug.security_related IS False
 UNION
 SELECT BugTask.bug
 FROM BugTask, TeamParticipation, DistroSeries, Distribution
 WHERE TeamParticipation.person = 67034 AND
 TeamParticipation.team = Distribution.owner AND
 DistroSeries.distribution = Distribution.id AND
 BugTask.distroseries = DistroSeries.id AND
 BugTask.bug = Bug.id AND
 Bug.security_related IS False

 ))
 ORDER BY BugTask.importance DESC, BugTask.id LIMIT 76 OFFSET 0

Revision history for this message
Michael Hope (michaelh1) wrote :

I see this too. See OOPS-2116CL1.

Revision history for this message
Martin Pool (mbp) wrote :

@michael1 after you posted, Launchpad deployed my fix for bug 866100 which should also have helped with this.

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.