explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XWWF

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 16.509 ↓ 6.0 6 1

Limit (cost=554.73..554.74 rows=1 width=1,258) (actual time=16.507..16.509 rows=6 loops=1)

  • Buffers: shared hit=10,413
2. 0.040 16.506 ↓ 6.0 6 1

Sort (cost=554.73..554.74 rows=1 width=1,258) (actual time=16.505..16.506 rows=6 loops=1)

  • Sort Key: ((milestones.due_date IS NULL)), ((milestones.id IS NULL)), milestones.due_date DESC, issues.id DESC
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=10,413
3. 0.019 16.466 ↓ 6.0 6 1

Nested Loop Semi Join (cost=58.15..554.72 rows=1 width=1,258) (actual time=12.574..16.466 rows=6 loops=1)

  • Buffers: shared hit=10,413
4. 0.051 16.407 ↓ 8.0 8 1

Nested Loop Semi Join (cost=57.59..552.71 rows=1 width=1,268) (actual time=11.186..16.407 rows=8 loops=1)

  • Buffers: shared hit=10,376
5. 0.199 14.684 ↓ 152.0 152 1

Nested Loop Left Join (cost=57.02..550.44 rows=1 width=1,264) (actual time=5.021..14.684 rows=152 loops=1)

  • Buffers: shared hit=9,404
6. 0.211 14.181 ↓ 152.0 152 1

Nested Loop (cost=56.60..548.92 rows=1 width=1,256) (actual time=5.007..14.181 rows=152 loops=1)

  • Buffers: shared hit=8,848
7. 1.093 5.339 ↓ 9.0 1,233 1

HashAggregate (cost=56.03..57.40 rows=137 width=4) (actual time=4.856..5.339 rows=1,233 loops=1)

  • Group Key: label_links_1.target_id
  • Buffers: shared hit=2,679
8. 4.246 4.246 ↓ 9.0 1,233 1

Index Scan using index_label_links_on_label_id on public.label_links label_links_1 (cost=0.56..55.69 rows=137 width=4) (actual time=0.035..4.246 rows=1,233 loops=1)

  • Index Cond: (label_links_1.label_id = 3,005,495)
  • Filter: ((label_links_1.target_type)::text = 'Issue'::text)
  • Rows Removed by Filter: 1,481
  • Buffers: shared hit=2,679
9. 8.631 8.631 ↓ 0.0 0 1,233

Index Scan using issues_pkey on public.issues (cost=0.56..3.59 rows=1 width=1,252) (actual time=0.007..0.007 rows=0 loops=1,233)

  • Index Cond: (issues.id = label_links_1.target_id)
  • Filter: ((issues.project_id = 278,964) AND (issues.state_id = 1))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=6,169
10. 0.304 0.304 ↑ 1.0 1 152

Index Scan using milestones_pkey on public.milestones (cost=0.42..1.53 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=152)

  • Index Cond: (issues.milestone_id = milestones.id)
  • Buffers: shared hit=556
11. 1.672 1.672 ↓ 0.0 0 152

Index Only Scan using index_on_label_links_all_columns on public.label_links (cost=0.56..2.26 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=152)

  • Index Cond: ((label_links.target_id = label_links_1.target_id) AND (label_links.target_type = 'Issue'::text))
  • Heap Fetches: 3
  • Filter: (label_links.label_id = ANY ('{1924053,2191076,2229310,2251841,2278648,2379994,2414262,3519299,3791725,3892549,3892770,3899495,3969396,3999541,3999564,4007552,4007738,4049204,4057321,4063693,4117093,6190961,7142293,7157910,7256789,7717873,7841215,8761704,8827899,8828075,8828148,9084503,10778837,10778846,11602405,12073682,12932265,13682327,15339054}'::integer[]))
  • Rows Removed by Filter: 7
  • Buffers: shared hit=972
12. 0.040 0.040 ↑ 1.0 1 8

Index Only Scan using index_on_label_links_all_columns on public.label_links label_links_2 (cost=0.56..2.00 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=8)

  • Index Cond: ((label_links_2.target_id = issues.id) AND (label_links_2.label_id = 2,278,656) AND (label_links_2.target_type = 'Issue'::text))
  • Heap Fetches: 0
  • Buffers: shared hit=37