Aggregate (cost=252894.18..252894.19 rows=1 width=0) -> Nested Loop (cost=252793.86..252894.11 rows=24 width=0) -> HashAggregate (cost=252793.86..252794.10 rows=24 width=280) -> Append (cost=0.00..252792.24 rows=24 width=280) -> Nested Loop Left Join (cost=0.00..150.86 rows=4 width=280) Filter: ((public.bugtask.product IS NULL) OR public.product.active) -> Nested Loop (cost=0.00..135.34 rows=4 width=280) -> Index Scan using bugtask__assignee__idx on bugtask (cost=0.00..22.48 rows=4 width=280) Index Cond: (assignee = 343381) Filter: ((status = 10) OR (status = 15) OR (status = 20) OR (status = 21) OR (status = 22) OR (status = 25)) -> Index Scan using bug__new_patches__idx on bug (cost=0.00..28.20 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) Filter: ((NOT public.bug.private) OR (SubPlan 6)) SubPlan 6 -> Unique (cost=24.32..24.33 rows=2 width=4) -> Sort (cost=24.32..24.33 rows=2 width=4) Sort Key: public.bugsubscription.bug -> Append (cost=0.00..24.31 rows=2 width=4) -> Nested Loop (cost=0.00..16.36 rows=1 width=4) -> Index Scan using bugsubscription_bug_idx on bugsubscription (cost=0.00..4.46 rows=3 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugsubscription.person) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..7.93 rows=1 width=4) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugtask.assignee) AND (public.teamparticipation.person = 6874)) -> Index Scan using product_pkey on product (cost=0.00..3.87 rows=1 width=5) Index Cond: (public.bugtask.product = public.product.id) Filter: public.product.active -> Nested Loop (cost=0.00..1923.96 rows=4 width=280) -> Nested Loop Left Join (cost=0.00..629.41 rows=46 width=284) Filter: ((public.bugtask.product IS NULL) OR public.product.active) -> Nested Loop (cost=0.00..614.49 rows=50 width=284) -> Index Scan using bugsubscription_person_idx on bugsubscription (cost=0.00..157.03 rows=115 width=4) Index Cond: (person = 343381) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=280) Index Cond: (public.bugtask.bug = public.bugsubscription.bug) Filter: ((public.bugtask.status = 10) OR (public.bugtask.status = 15) OR (public.bugtask.status = 20) OR (public.bugtask.status = 21) OR (public.bugtask.status = 22) OR (public.bugtask.status = 25)) -> Index Scan using product_pkey on product (cost=0.00..0.29 rows=1 width=5) Index Cond: (public.bugtask.product = public.product.id) Filter: public.product.active -> Index Scan using bug__new_patches__idx on bug (cost=0.00..28.13 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) Filter: ((NOT public.bug.private) OR (SubPlan 5)) SubPlan 5 -> Unique (cost=24.32..24.33 rows=2 width=4) -> Sort (cost=24.32..24.33 rows=2 width=4) Sort Key: public.bugsubscription.bug -> Append (cost=0.00..24.31 rows=2 width=4) -> Nested Loop (cost=0.00..16.36 rows=1 width=4) -> Index Scan using bugsubscription_bug_idx on bugsubscription (cost=0.00..4.46 rows=3 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugsubscription.person) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..7.93 rows=1 width=4) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugtask.assignee) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..39.80 rows=1 width=280) -> Nested Loop Left Join (cost=0.00..11.58 rows=1 width=280) Filter: ((public.bugtask.product IS NULL) OR public.product.active) -> Index Scan using bugtask__owner__idx on bugtask (cost=0.00..7.70 rows=1 width=280) Index Cond: (owner = 343381) Filter: ((status = 10) OR (status = 15) OR (status = 20) OR (status = 21) OR (status = 22) OR (status = 25)) -> Index Scan using product_pkey on product (cost=0.00..3.87 rows=1 width=5) Index Cond: (public.bugtask.product = public.product.id) Filter: public.product.active -> Index Scan using bug__new_patches__idx on bug (cost=0.00..28.20 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) Filter: ((public.bug.owner = 343381) AND ((NOT public.bug.private) OR (SubPlan 4))) SubPlan 4 -> Unique (cost=24.32..24.33 rows=2 width=4) -> Sort (cost=24.32..24.33 rows=2 width=4) Sort Key: public.bugsubscription.bug -> Append (cost=0.00..24.31 rows=2 width=4) -> Nested Loop (cost=0.00..16.36 rows=1 width=4) -> Index Scan using bugsubscription_bug_idx on bugsubscription (cost=0.00..4.46 rows=3 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugsubscription.person) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..7.93 rows=1 width=4) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugtask.assignee) AND (public.teamparticipation.person = 6874)) -> Nested Loop Left Join (cost=22.42..87.17 rows=1 width=280) Filter: ((public.bugtask.product IS NULL) OR public.product.active) -> Nested Loop (cost=22.42..86.87 rows=1 width=280) -> Nested Loop (cost=22.42..30.45 rows=2 width=284) -> HashAggregate (cost=22.42..22.44 rows=2 width=4) -> Index Scan using bugmessage__owner__index__idx on bugmessage (cost=0.00..22.39 rows=11 width=4) Index Cond: ((owner = 343381) AND (index > 0)) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.98 rows=1 width=280) Index Cond: (public.bugtask.bug = bugmessage.bug) Filter: ((public.bugtask.status = 10) OR (public.bugtask.status = 15) OR (public.bugtask.status = 20) OR (public.bugtask.status = 21) OR (public.bugtask.status = 22) OR (public.bugtask.status = 25)) -> Index Scan using bug__new_patches__idx on bug (cost=0.00..28.20 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) Filter: ((NOT public.bug.private) OR (SubPlan 3)) SubPlan 3 -> Unique (cost=24.32..24.33 rows=2 width=4) -> Sort (cost=24.32..24.33 rows=2 width=4) Sort Key: public.bugsubscription.bug -> Append (cost=0.00..24.31 rows=2 width=4) -> Nested Loop (cost=0.00..16.36 rows=1 width=4) -> Index Scan using bugsubscription_bug_idx on bugsubscription (cost=0.00..4.46 rows=3 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugsubscription.person) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..7.93 rows=1 width=4) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugtask.assignee) AND (public.teamparticipation.person = 6874)) -> Index Scan using product_pkey on product (cost=0.00..0.29 rows=1 width=5) Index Cond: (public.bugtask.product = public.product.id) Filter: public.product.active -> Nested Loop (cost=130015.13..250590.21 rows=14 width=280) CTE ss -> Bitmap Heap Scan on structuralsubscription (cost=3.38..171.62 rows=171 width=56) Recheck Cond: (subscriber = 343381) -> Bitmap Index Scan on structuralsubscription__subscriber__idx (cost=0.00..3.33 rows=171 width=0) Index Cond: (subscriber = 343381) -> Nested Loop Left Join (cost=129843.51..245766.74 rows=182 width=280) Filter: ((public.bugtask.product IS NULL) OR public.product.active) -> Hash Semi Join (cost=129843.51..245707.04 rows=200 width=280) Hash Cond: (public.bugtask.id = public.bugtask.id) -> Seq Scan on bugtask (cost=0.00..89908.93 rows=319595 width=280) Filter: ((status = 10) OR (status = 15) OR (status = 20) OR (status = 21) OR (status = 22) OR (status = 25)) -> Hash (cost=124703.02..124703.02 rows=313319 width=4) -> HashAggregate (cost=118436.64..121569.83 rows=313319 width=4) -> Hash Left Join (cost=3651.85..117653.34 rows=313319 width=4) Hash Cond: (public.bugtask.productseries = ss2.productseries) Filter: (null_count(ARRAY[ss1.id, ss2.id, ss3.id, ss4.id, ss5.id, ss6.id]) < 6) -> Hash Left Join (cost=3646.29..113795.87 rows=939957 width=28) Hash Cond: (public.bugtask.product = ss1.product) -> Hash Left Join (cost=3640.74..110183.44 rows=939957 width=28) Hash Cond: (public.bugtask.distribution = ss4.distribution) Join Filter: ((public.bugtask.sourcepackagename = ss4.sourcepackagename) OR (ss4.sourcepackagename IS NULL)) -> Hash Left Join (cost=3635.18..99507.87 rows=939957 width=32) Hash Cond: (public.bugtask.distroseries = ss5.distroseries) -> Hash Left Join (cost=3629.62..95735.31 rows=939957 width=32) Hash Cond: (public.bugtask.milestone = ss6.milestone) -> Hash Left Join (cost=3624.06..92180.66 rows=939957 width=32) Hash Cond: (public.bugtask.product = public.product.id) -> Seq Scan on bugtask (cost=0.00..75809.57 rows=939957 width=28) -> Hash (cost=3328.85..3328.85 rows=23617 width=8) -> Hash Left Join (cost=5.56..3328.85 rows=23617 width=8) Hash Cond: (public.product.project = ss3.project) -> Seq Scan on product (cost=0.00..3224.04 rows=23617 width=8) Filter: active -> Hash (cost=3.42..3.42 rows=171 width=8) -> CTE Scan on ss ss3 (cost=0.00..3.42 rows=171 width=8) -> Hash (cost=3.42..3.42 rows=171 width=8) -> CTE Scan on ss ss6 (cost=0.00..3.42 rows=171 width=8) -> Hash (cost=3.42..3.42 rows=171 width=8) -> CTE Scan on ss ss5 (cost=0.00..3.42 rows=171 width=8) -> Hash (cost=3.42..3.42 rows=171 width=12) -> CTE Scan on ss ss4 (cost=0.00..3.42 rows=171 width=12) -> Hash (cost=3.42..3.42 rows=171 width=8) -> CTE Scan on ss ss1 (cost=0.00..3.42 rows=171 width=8) -> Hash (cost=3.42..3.42 rows=171 width=8) -> CTE Scan on ss ss2 (cost=0.00..3.42 rows=171 width=8) -> Index Scan using product_pkey on product (cost=0.00..0.29 rows=1 width=5) Index Cond: (public.bugtask.product = public.product.id) Filter: public.product.active -> Index Scan using bug__new_patches__idx on bug (cost=0.00..25.55 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) Filter: ((NOT public.bug.private) OR (SubPlan 2)) SubPlan 2 -> Unique (cost=24.32..24.33 rows=2 width=4) -> Sort (cost=24.32..24.33 rows=2 width=4) Sort Key: public.bugsubscription.bug -> Append (cost=0.00..24.31 rows=2 width=4) -> Nested Loop (cost=0.00..16.36 rows=1 width=4) -> Index Scan using bugsubscription_bug_idx on bugsubscription (cost=0.00..4.46 rows=3 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugsubscription.person) AND (public.teamparticipation.person = 6874)) -> Nested Loop (cost=0.00..7.93 rows=1 width=4) -> Index Scan using bugtask__bug__idx on bugtask (cost=0.00..3.97 rows=1 width=8) Index Cond: (bug = $1) -> Index Scan using teamparticipation_team_key on teamparticipation (cost=0.00..3.95 rows=1 width=4) Index Cond: ((public.teamparticipation.team = public.bugtask.assignee) AND (public.teamparticipation.person = 6874)) -> Index Scan using bug_pkey on bug (cost=0.00..4.14 rows=1 width=4) Index Cond: (public.bug.id = public.bugtask.bug) (188 rows)