explain.depesz.com

PostgreSQL's explain analyze made readable

Result: llhF

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 409.355 32,493.001 ↑ 1.7 325,399 1

Gather (cost=1,628.58..88,077,408.73 rows=543,900 width=89) (actual time=8.265..32,493.001 rows=325,399 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 4,221.415 32,083.646 ↑ 2.1 108,466 3 / 3

Nested Loop (cost=628.58..88,022,018.73 rows=226,625 width=89) (actual time=15.328..32,083.646 rows=108,466 loops=3)

3. 1,645.794 2,925.452 ↑ 1.3 1,558,549 3 / 3

Hash Left Join (cost=591.55..87,425.68 rows=1,951,358 width=60) (actual time=14.930..2,925.452 rows=1,558,549 loops=3)

  • Hash Cond: ((iip.place_id = bip.id) AND (iip.place_type = bip.place_type))
4. 1,265.007 1,265.007 ↑ 1.3 1,558,549 3 / 3

Parallel Seq Scan on instance_in_place iip (cost=0.00..76,589.42 rows=1,951,358 width=48) (actual time=0.015..1,265.007 rows=1,558,549 loops=3)

  • Filter: (stock_type = ANY ('{1}'::integer[]))
  • Rows Removed by Filter: 45,180
5. 7.118 14.651 ↓ 1.0 18,151 3 / 3

Hash (cost=319.42..319.42 rows=18,142 width=20) (actual time=14.651..14.651 rows=18,151 loops=3)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,249kB
6. 7.533 7.533 ↓ 1.0 18,151 3 / 3

Seq Scan on boxing_in_place bip (cost=0.00..319.42 rows=18,142 width=20) (actual time=0.028..7.533 rows=18,151 loops=3)

7. 9,351.292 24,936.779 ↓ 0.0 0 4,675,646 / 3

Bitmap Heap Scan on place p (cost=37.03..45.05 rows=1 width=41) (actual time=0.016..0.016 rows=0 loops=4,675,646)

  • Recheck Cond: (((place_id = iip.place_id) AND (place_type = iip.place_type)) OR ((place_id = bip.place_id) AND (place_type = bip.place_type)))
  • Filter: ((parent_place_id = ANY ('{99}'::integer[])) AND (parent_place_type = ANY ('{4}'::integer[])) AND (((place_id = iip.place_id) AND (place_type = iip.place_type)) OR ((place_id = bip.place_id) AND (place_type = bip.place_type) AND (warehouse_id = iip.warehouse_id))))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2,415,860
8. 1,558.549 15,585.487 ↓ 0.0 0 4,675,646 / 3

BitmapOr (cost=37.03..37.03 rows=3 width=0) (actual time=0.010..0.010 rows=0 loops=4,675,646)

9. 14,026.938 14,026.938 ↑ 1.0 2 4,675,646 / 3

Bitmap Index Scan on place_place_idx (cost=0.00..0.47 rows=2 width=0) (actual time=0.009..0.009 rows=2 loops=4,675,646)

  • Index Cond: ((place_id = iip.place_id) AND (place_type = iip.place_type))
10. 0.000 0.000 ↓ 0.0 0 4,675,646 / 3

Bitmap Index Scan on place_place_idx (cost=0.00..3.27 rows=2 width=0) (actual time=0.000..0.000 rows=0 loops=4,675,646)

  • Index Cond: ((place_id = bip.place_id) AND (place_type = bip.place_type))
Planning time : 0.714 ms
Execution time : 32,530.832 ms