explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LGwv

Settings
# exclusive inclusive rows x rows loops node
1. 37.381 3,245.983 ↑ 1.1 115 1

GroupAggregate (cost=5,791.11..950,103.76 rows=125 width=24) (actual time=648.513..3,245.983 rows=115 loops=1)

  • Group Key: i2.issue_id
2. 1,153.436 3,208.602 ↓ 964.2 120,521 1

Nested Loop (cost=5,791.11..950,101.89 rows=125 width=32) (actual time=280.803..3,208.602 rows=120,521 loops=1)

  • Join Filter: (i2.issue_id = unit_issues.issue_id)
  • Rows Removed by Join Filter: 17831657
3. 0.564 0.564 ↑ 1.0 122 1

Index Only Scan using unit_issues_issue_id_domain_unit_id_index on unit_issues (cost=0.28..282.73 rows=122 width=16) (actual time=0.006..0.564 rows=122 loops=1)

  • Index Cond: (domain_unit_id = 'ff900870-1e78-46b2-bf39-84af9540db98'::uuid)
  • Heap Fetches: 0
4. 1,440.611 2,054.602 ↓ 109.2 147,149 122

Materialize (cost=5,790.83..947,357.52 rows=1,347 width=32) (actual time=0.487..16.841 rows=147,149 loops=122)

5. 5.657 613.991 ↓ 109.2 147,149 1

Gather (cost=5,790.83..947,350.78 rows=1,347 width=32) (actual time=59.146..613.991 rows=147,149 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 70.989 608.334 ↓ 87.4 49,050 3

Nested Loop (cost=4,790.83..946,216.08 rows=561 width=32) (actual time=54.727..608.334 rows=49,050 loops=3)

7. 321.196 537.333 ↓ 5.7 5,367 3

Nested Loop (cost=4,790.27..927,983.07 rows=945 width=32) (actual time=54.707..537.333 rows=5,367 loops=3)

8. 172.149 216.132 ↑ 1.1 59,712 3

Parallel Bitmap Heap Scan on unit_media_items u0 (cost=4,789.70..461,771.34 rows=67,588 width=16) (actual time=52.942..216.132 rows=59,712 loops=3)

  • Recheck Cond: (domain_unit_id = 'ff900870-1e78-46b2-bf39-84af9540db98'::uuid)
  • Rows Removed by Index Recheck: 241853
  • Heap Blocks: exact=17679 lossy=32276
9. 43.983 43.983 ↓ 1.6 267,538 1

Bitmap Index Scan on unit_media_items_domain_unit_id_index (cost=0.00..4,749.15 rows=162,212 width=0) (actual time=43.983..43.983 rows=267,538 loops=1)

  • Index Cond: (domain_unit_id = 'ff900870-1e78-46b2-bf39-84af9540db98'::uuid)
10. 0.005 0.005 ↓ 0.0 0 179,137

Index Scan using media_items_pkey on media_items m1 (cost=0.56..6.90 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=179,137)

  • Index Cond: (id = u0.media_item_id)
  • Filter: ((published_date > 1567440000) AND (published_date < 1570118399) AND ('USA'::text = ANY ((country_id)::text[])))
  • Rows Removed by Filter: 1
11. 0.012 0.012 ↑ 2.6 9 16,102

Index Scan using issue_media_items_media_item_id_index on issue_media_items i2 (cost=0.56..19.06 rows=23 width=32) (actual time=0.005..0.012 rows=9 loops=16,102)

  • Index Cond: (media_item_id = m1.id)
Planning time : 1.429 ms
Execution time : 3,250.567 ms