explain.depesz.com

PostgreSQL's explain analyze made readable

Result: koJC

Settings
# exclusive inclusive rows x rows loops node
1. 72.380 452.125 ↑ 1.0 1 1

Aggregate (cost=6,424,315,764,454.31..6,424,315,764,454.32 rows=1 width=8) (actual time=452.124..452.125 rows=1 loops=1)

  • Buffers: shared hit=216,014
2. 379.745 379.745 ↓ 2.4 288,137 1

Index Only Scan using index_notes_on_author_id_and_created_at_and_id on public.notes (cost=0.57..6,424,315,764,154.96 rows=119,738 width=4) (actual time=0.093..379.745 rows=288,137 loops=1)

  • Index Cond: ((notes.author_id >= 0) AND (notes.author_id <= 1,000))
  • Heap Fetches: 27,185
  • Filter: (SubPlan 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=216,005
3.          

SubPlan (for Index Only Scan)

4. 0.000 0.000 ↑ 2,050,146.0 1 288,137

CTE Scan on notes_cte notes_2 (cost=26,803,601.44..26,844,604.36 rows=2,050,146 width=4) (actual time=0.000..0.000 rows=1 loops=288,137)

  • Buffers: shared hit=11
5.          

CTE notes_cte

6. 0.004 0.053 ↑ 2,050,146.0 1 1

Nested Loop (cost=0.57..26,803,601.44 rows=2,050,146 width=3,071) (actual time=0.052..0.053 rows=1 loops=1)

  • Buffers: shared hit=11
7. 0.029 0.029 ↑ 3,738,203.5 2 1

Seq Scan on public.system_note_metadata (cost=0.00..10,700,269.29 rows=7,476,407 width=45) (actual time=0.029..0.029 rows=2 loops=1)

  • Filter: ((system_note_metadata.action)::text = 'title'::text)
  • Rows Removed by Filter: 27
  • Buffers: shared hit=1
8. 0.020 0.020 ↓ 0.0 0 2

Index Scan using notes_pkey on public.notes notes_1 (cost=0.57..2.15 rows=1 width=3,026) (actual time=0.010..0.010 rows=0 loops=2)

  • Index Cond: (notes_1.id = system_note_metadata.note_id)
  • Filter: (notes_1.system AND ((notes_1.noteable_type)::text = 'Issue'::text))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=10