explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k66x

Settings
# exclusive inclusive rows x rows loops node
1. 38.541 663.039 ↓ 7,361.0 7,361 1

Nested Loop (cost=38.63..33,746.85 rows=1 width=271) (actual time=542.507..663.039 rows=7,361 loops=1)

  • Join Filter: (b.batch_id = d.batch_id)
2. 118.938 552.089 ↓ 5.3 3,811 1

Hash Join (cost=38.48..11,757.29 rows=713 width=282) (actual time=542.459..552.089 rows=3,811 loops=1)

  • Hash Cond: (w.batch_id = b.batch_id)
3. 210.365 432.139 ↓ 23.4 279,481 1

Append (cost=1.27..11,668.15 rows=11,946 width=218) (actual time=47.437..432.139 rows=279,481 loops=1)

  • Subplans Removed: 74
4. 175.417 221.774 ↓ 100.0 279,481 1

Bitmap Heap Scan on windows_73 w (cost=53.84..2,552.79 rows=2,795 width=145) (actual time=47.436..221.774 rows=279,481 loops=1)

  • Recheck Cond: (window_range && $2)
  • Filter: (div_id = $1)
  • Heap Blocks: exact=7444
5. 46.357 46.357 ↓ 100.0 279,481 1

Bitmap Index Scan on windows_73_batch_id_window_range_idx (cost=0.00..53.14 rows=2,795 width=0) (actual time=46.301..46.357 rows=279,481 loops=1)

  • Index Cond: (window_range && $2)
6. 0.503 1.012 ↑ 1.0 1,076 1

Hash (cost=23.76..23.76 rows=1,076 width=64) (actual time=0.945..1.012 rows=1,076 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 118kB
7. 0.509 0.509 ↑ 1.0 1,076 1

Seq Scan on _batches b (cost=0.00..23.76 rows=1,076 width=64) (actual time=0.006..0.509 rows=1,076 loops=1)

8. 7.622 72.409 ↑ 38.0 2 3,811

Append (cost=0.15..29.89 rows=76 width=339) (actual time=0.009..0.019 rows=2 loops=3,811)

  • Subplans Removed: 75
9. 64.787 64.787 ↓ 2.0 2 3,811

Index Scan using dimensions_73_batch_id_rightsets_hash_idx on dimensions_73 d (cost=0.56..2.69 rows=1 width=679) (actual time=0.008..0.017 rows=2 loops=3,811)

  • Index Cond: ((batch_id = w.batch_id) AND (rightsets_hash = w.rightsets_hash))
  • Filter: ((div_id = $1) AND (($4 IS NULL) OR (icount($4) = 0) OR ($4 && dim1_value_ids)) AND (($5 IS NULL) OR (icount($5) = 0) OR ($5 && dim2_value_ids)) AND (($6 IS NULL) OR (icount($6) = 0) OR ($6 && dim3_value_ids)) AND (($7 IS NULL) OR (icount($7) = 0) OR ($7 && dim4_value_ids)))
  • Rows Removed by Filter: 7