explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Nh4

Settings
# exclusive inclusive rows x rows loops node
1. 36.291 120.170 ↓ 408.9 7,361 1

Nested Loop (cost=0.98..35,126.00 rows=18 width=252) (actual time=0.094..120.170 rows=7,361 loops=1)

  • Join Filter: (b.batch_id = d.batch_id)
2. 3.894 15.281 ↑ 4.4 3,811 1

Nested Loop (cost=0.42..6,355.21 rows=16,689 width=209) (actual time=0.043..15.281 rows=3,811 loops=1)

3. 0.627 0.627 ↑ 1.0 1,076 1

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

4. 4.304 10.760 ↑ 4.8 4 1,076

Append (cost=0.42..5.69 rows=19 width=145) (actual time=0.004..0.010 rows=4 loops=1,076)

5. 6.456 6.456 ↑ 4.8 4 1,076

Index Scan using windows_73_batch_id_rightsets_hash_idx on windows_73 w (cost=0.42..5.60 rows=19 width=145) (actual time=0.003..0.006 rows=4 loops=1,076)

  • Index Cond: (batch_id = b.batch_id)
  • Filter: ((window_range && '[-infinity,infinity)'::daterange) AND (div_id = 73))
6. 7.622 68.598 ↓ 2.0 2 3,811

Append (cost=0.56..1.71 rows=1 width=679) (actual time=0.008..0.018 rows=2 loops=3,811)

7. 60.976 60.976 ↓ 2.0 2 3,811

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

  • Index Cond: ((batch_id = w.batch_id) AND (rightsets_hash = w.rightsets_hash))
  • Filter: (('{25,27,160,194,196}'::integer[] && dim1_value_ids) AND ('{516}'::integer[] && dim2_value_ids) AND ('{180}'::integer[] && dim3_value_ids) AND (div_id = 73))
  • Rows Removed by Filter: 7