explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Qq89

Settings
# exclusive inclusive rows x rows loops node
1. 16.195 1,239,149.993 ↓ 9,982.0 9,982 1

Sort (cost=3,506.09..3,506.10 rows=1 width=4) (actual time=1,239,148.546..1,239,149.993 rows=9,982 loops=1)

  • Sort Key: notes.id
  • Sort Method: quicksort Memory: 852kB
  • Buffers: shared hit=571605 read=1008876 dirtied=1937
  • I/O Timings: read=769494.107
2. 16.860 1,239,133.798 ↓ 9,982.0 9,982 1

Hash Left Join (cost=12.84..3,506.08 rows=1 width=4) (actual time=19.368..1,239,133.798 rows=9,982 loops=1)

  • Hash Cond: (notes.id = epic_user_mentions.note_id)
  • Filter: (epic_user_mentions.epic_id IS NULL)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=571605 read=1008876 dirtied=1937
  • I/O Timings: read=769494.107
3. 26.850 1,239,116.711 ↓ 302.5 9,982 1

Merge Join (cost=1.87..3,494.98 rows=33 width=4) (actual time=19.112..1,239,116.711 rows=9,982 loops=1)

  • Buffers: shared hit=571493 read=1008876 dirtied=1937
  • I/O Timings: read=769494.107
4. 1,239,029.577 1,239,029.577 ↑ 1.1 10,000 1

Index Scan using index_notes_on_noteable_id_and_noteable_type on public.notes (cost=0.57..4,882,648.21 rows=11,432 width=8) (actual time=17.463..1,239,029.577 rows=10,000 loops=1)

  • Index Cond: ((notes.noteable_type)::text = 'Epic'::text)
  • Filter: ((notes.note ~~ '%@%'::text) AND (notes.id >= 67972855) AND (notes.id < 268738059))
  • Rows Removed by Filter: 149884
  • Buffers: shared hit=571384 read=1008768 dirtied=1935
  • I/O Timings: read=769446.549
5. 60.284 60.284 ↓ 1.4 22,698 1

Index Only Scan using epics_pkey on public.epics (cost=0.29..463.48 rows=16,346 width=4) (actual time=1.641..60.284 rows=22,698 loops=1)

  • Heap Fetches: 187
  • Buffers: shared hit=109 read=108 dirtied=2
  • I/O Timings: read=47.558
6. 0.062 0.227 ↑ 1.4 182 1

Hash (cost=7.87..7.87 rows=248 width=8) (actual time=0.227..0.227 rows=182 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=112
7. 0.165 0.165 ↓ 1.0 252 1

Index Only Scan using epic_user_mentions_on_epic_id_and_note_id_index on public.epic_user_mentions (cost=0.14..7.87 rows=248 width=8) (actual time=0.062..0.165 rows=252 loops=1)

  • Heap Fetches: 252
  • Buffers: shared hit=112