explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QkBo

Settings
# exclusive inclusive rows x rows loops node
1. 487.636 159,424.476 ↑ 1.0 1 1

Aggregate (cost=28,180,402,361,341.24..28,180,402,361,341.25 rows=1 width=8) (actual time=159,424.476..159,424.476 rows=1 loops=1)

  • Buffers: shared hit=734,665 read=100,745 dirtied=45,715
  • I/O Timings: read=150,207.534
2. 158,936.840 158,936.840 ↓ 2.1 1,398,478 1

Index Only Scan using index_notes_on_author_id_and_created_at_and_id on public.notes (cost=0.57..28,180,402,359,658.04 rows=673,279 width=4) (actual time=12.746..158,936.840 rows=1,398,478 loops=1)

  • Index Cond: ((notes.author_id >= 0) AND (notes.author_id <= 10,000))
  • Heap Fetches: 102,247
  • Filter: (SubPlan 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=734,659 read=100,745 dirtied=45,715
  • I/O Timings: read=150,207.534
3.          

SubPlan (for Index Only Scan)

4. 0.000 0.000 ↑ 2,051,137.0 1 1,398,478

CTE Scan on notes_cte notes_2 (cost=20,904,670.23..20,945,692.97 rows=2,051,137 width=4) (actual time=0.000..0.000 rows=1 loops=1,398,478)

  • Buffers: shared hit=9 read=6
  • I/O Timings: read=12.518
5.          

CTE notes_cte

6. 0.012 12.653 ↑ 2,051,137.0 1 1

Nested Loop (cost=1.14..20,904,670.23 rows=2,051,137 width=3,071) (actual time=12.653..12.653 rows=1 loops=1)

  • Buffers: shared hit=9 read=6
  • I/O Timings: read=12.518
7. 3.329 3.329 ↑ 3,740,011.0 2 1

Index Scan using index_system_note_metadata_on_action on public.system_note_metadata (cost=0.57..4,794,855.19 rows=7,480,022 width=45) (actual time=3.327..3.329 rows=2 loops=1)

  • Index Cond: ((system_note_metadata.action)::text = 'title'::text)
  • Buffers: shared hit=4 read=1
  • I/O Timings: read=3.278
8. 9.312 9.312 ↓ 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=4.656..4.656 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=5 read=5
  • I/O Timings: read=9.240