explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hOTk

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 34.068 22,109.283 ↓ 10,858.0 10,858 1

Nested Loop (cost=6,923.33..11,770.59 rows=1 width=362) (actual time=17,128.188..22,109.283 rows=10,858 loops=1)

  • Buffers: shared hit=83494
2. 21,898.873 22,031.783 ↓ 10,858.0 10,858 1

Bitmap Heap Scan on context c (cost=6,923.33..11,762.31 rows=1 width=329) (actual time=17,128.121..22,031.783 rows=10,858 loops=1)

  • Recheck Cond: ((tags @> '{blah}'::text[]) AND (x_key = 1))
  • Filter: (key = ANY ('{15368196,(a lot more keys here)}'::integer[]))
  • Buffers: shared hit=50919
3. 13.648 132.910 ↓ 0.0 0 1

BitmapAnd (cost=6,923.33..6,923.33 rows=269 width=0) (actual time=132.910..132.910 rows=0 loops=1)

  • Buffers: shared hit=1342
4. 64.614 64.614 ↓ 16.7 264,777 1

Bitmap Index Scan on context_tags_idx (cost=0.00..1,149.61 rows=15,891 width=0) (actual time=64.614..64.614 rows=264,777 loops=1)

  • Index Cond: (tags @> '{blah}'::text[])
  • Buffers: shared hit=401
5. 54.648 54.648 ↑ 1.0 267,659 1

Bitmap Index Scan on context_x_id_source_type_id_idx (cost=0.00..5,773.47 rows=268,667 width=0) (actual time=54.648..54.648 rows=267,659 loops=1)

  • Index Cond: (x_id = 1)
  • Buffers: shared hit=941
6. 43.432 43.432 ↑ 1.0 1 10,858

Index Scan using x_pkey on x (cost=0.00..8.27 rows=1 width=37) (actual time=0.003..0.004 rows=1 loops=10,858)

  • Index Cond: (x.key = 1)
  • Buffers: shared hit=32575