explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NNMc

Settings
# exclusive inclusive rows x rows loops node
1. 150,643.176 314,930.907 ↓ 7,361.0 7,361 1

Nested Loop (cost=1.42..379,881.50 rows=1 width=271) (actual time=308,253.514..314,930.907 rows=7,361 loops=1)

  • Join Filter: (w.batch_id = b.batch_id)
  • Rows Removed by Join Filter: 372711507
2. 635.417 9,796.453 ↓ 346,393.0 346,393 1

Nested Loop (cost=1.42..379,844.22 rows=1 width=542) (actual time=47.365..9,796.453 rows=346,393 loops=1)

3. 221.319 497.125 ↓ 23.3 279,481 1

Append (cost=1.27..11,717.64 rows=12,017 width=220) (actual time=47.327..497.125 rows=279,481 loops=1)

  • Subplans Removed: 74
4. 229.544 275.806 ↓ 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.326..275.806 rows=279,481 loops=1)

  • Recheck Cond: (window_range && $2)
  • Filter: (div_id = $1)
  • Heap Blocks: exact=7444
5. 46.262 46.262 ↓ 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.204..46.262 rows=279,481 loops=1)

  • Index Cond: (window_range && $2)
6. 558.962 8,663.911 ↑ 76.0 1 279,481

Append (cost=0.15..29.87 rows=76 width=339) (actual time=0.016..0.031 rows=1 loops=279,481)

  • Subplans Removed: 75
7. 8,104.949 8,104.949 ↑ 1.0 1 279,481

Index Scan using dimensions_73_batch_id_rightsets_hash_idx on dimensions_73 d (cost=0.56..2.69 rows=1 width=680) (actual time=0.015..0.029 rows=1 loops=279,481)

  • 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: 26
8. 154,491.278 154,491.278 ↑ 1.0 1,076 346,393

Seq Scan on _batches b (cost=0.00..23.76 rows=1,076 width=64) (actual time=0.002..0.446 rows=1,076 loops=346,393)