explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eLig : or-ed ownergroup plan

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=15,585,087.22..15,585,087.23 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Merge Join (cost=2,743,321.81..13,750,588.06 rows=733,799,667 width=4) (actual rows= loops=)

  • Merge Cond: (cachedgroupmembers_1.memberid = main.owner)
3. 0.000 0.000 ↓ 0.0

Sort (cost=2,194,090.30..2,194,196.31 rows=42,404 width=8) (actual rows= loops=)

  • Sort Key: cachedgroupmembers_1.memberid
4. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.43..2,190,831.15 rows=42,404 width=8) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..2,185,590.75 rows=17,668 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on cachedgroupmembers cachedgroupmembers_1 (cost=0.00..73,131.51 rows=2,323,945 width=8) (actual rows= loops=)

  • Filter: (disabled = '0'::smallint)
7. 0.000 0.000 ↓ 0.0

Index Only Scan using cachedgroupmembers4 on cachedgroupmembers cachedgroupmembers_2 (cost=0.43..0.90 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((memberid = cachedgroupmembers_1.memberid) AND (disabled = '0'::smallint))
  • Filter: ((cachedgroupmembers_1.groupid = 3424108) OR (groupid = 3424109))
8. 0.000 0.000 ↓ 0.0

Sort (cost=549,231.51..555,372.36 rows=2,456,341 width=8) (actual rows= loops=)

  • Sort Key: main.owner
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=81,156.63..288,514.50 rows=2,456,341 width=8) (actual rows= loops=)

  • Hash Cond: (groups_3.id = cachedgroupmembers_4.groupid)
  • Filter: ((main.queue = ANY ('{3,3,7,7,4,4,6,6,18,18,1,1,8,8,17,17,11,11,15,15,23,23,20,20,22,22,21,21,12,12,14,14,19,19,10,10,5,5,9,9,28,28,38,38,30,30,34,34,37,37,31,31,32,32,36,36,33,33,35
10. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=81,147.75..230,564.78 rows=2,896,824 width=22) (actual rows= loops=)

  • Hash Cond: (groups_3.instance = main.id)
11. 0.000 0.000 ↓ 0.0

Seq Scan on groups groups_3 (cost=0.00..108,806.51 rows=3,104,608 width=14) (actual rows= loops=)

  • Filter: (lower((domain)::text) = 'rt::ticket-role'::text)
12. 0.000 0.000 ↓ 0.0

Hash (cost=70,322.31..70,322.31 rows=866,035 width=12) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on tickets main (cost=0.00..70,322.31 rows=866,035 width=12) (actual rows= loops=)

  • Filter: ((ismerged IS NULL) AND ((status)::text <> 'deleted'::text) AND ((type)::text = 'ticket'::text))
14. 0.000 0.000 ↓ 0.0

Hash (cost=8.71..8.71 rows=14 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Only Scan using cachedgroupmembers4 on cachedgroupmembers cachedgroupmembers_4 (cost=0.43..8.71 rows=14 width=8) (actual rows= loops=)

  • Index Cond: ((memberid = 579312) AND (disabled = '0'::smallint))