explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BiGF

Settings
# exclusive inclusive rows x rows loops node
1. 0.908 25,921.911 ↑ 1.0 1 1

Aggregate (cost=1,045,467.72..1,045,467.73 rows=1 width=8) (actual time=25,921.911..25,921.911 rows=1 loops=1)

2. 6.877 25,921.003 ↓ 4,581.0 4,581 1

Hash Join (cost=576.37..1,045,467.71 rows=1 width=0) (actual time=21,705.319..25,921.003 rows=4,581 loops=1)

  • Hash Cond: (label_links.label_id = labels.id)
3. 2,026.455 25,914.070 ↓ 7.5 32,460 1

Merge Join (cost=563.08..1,045,438.21 rows=4,320 width=4) (actual time=21,703.513..25,914.070 rows=32,460 loops=1)

  • Merge Cond: (issues.id = label_links.target_id)
4. 6.892 11.209 ↓ 1.4 6,299 1

Sort (cost=557.94..568.97 rows=4,411 width=4) (actual time=5.895..11.209 rows=6,299 loops=1)

  • Sort Key: issues.id
  • Sort Method: quicksort Memory: 488kB
5. 4.317 4.317 ↓ 1.4 6,299 1

Index Only Scan using idx_issues_on_project_id_and_created_at_and_id_and_state_id on issues (cost=0.56..290.92 rows=4,411 width=4) (actual time=0.032..4.317 rows=6,299 loops=1)

  • Index Cond: ((project_id = 278964) AND (created_at > '2019-08-01 00:00:00+00'::timestamp with time zone))
  • Heap Fetches: 791
6. 23,876.406 23,876.406 ↓ 1.0 20,256,794 1

Index Scan using index_label_links_on_target_id_and_target_type on label_links (cost=0.56..1,092,294.44 rows=20,240,929 width=8) (actual time=0.016..23,876.406 rows=20,256,794 loops=1)

  • Index Cond: ((target_type)::text = 'Issue'::text)
7. 0.004 0.056 ↑ 1.2 5 1

Hash (cost=13.21..13.21 rows=6 width=4) (actual time=0.056..0.056 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.052 0.052 ↑ 1.2 5 1

Index Only Scan using labels_pkey on labels (cost=0.43..13.21 rows=6 width=4) (actual time=0.010..0.052 rows=5 loops=1)

  • Index Cond: (id = ANY ('{2731248,10230929,4116705,2492649,2278648,2779806}'::integer[]))
  • Heap Fetches: 2
Planning time : 2.145 ms
Execution time : 25,922.175 ms