explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fhWK : Optimization for: plan #llhF

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 3,805.500 29,645.266 ↑ 1.6 4,675,834 1

Gather (cost=2,516.94..1,821,355,745.56 rows=7,515,915 width=89) (actual time=18.382..29,645.266 rows=4,675,834 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 3,317.100 25,839.766 ↑ 2.0 1,558,611 3 / 3

Nested Loop Left Join (cost=1,516.94..1,820,603,154.06 rows=3,131,631 width=89) (actual time=23.607..25,839.766 rows=1,558,611 loops=3)

3. 1,277.072 2,260.719 ↑ 1.3 1,558,611 3 / 3

Hash Left Join (cost=591.73..87,409.43 rows=1,950,749 width=60) (actual time=23.509..2,260.719 rows=1,558,611 loops=3)

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

Parallel Seq Scan on instance_in_place iip (cost=0.00..76,576.19 rows=1,950,749 width=48) (actual time=0.022..961.644 rows=1,558,611 loops=3)

  • Filter: (stock_type = ANY ('{1}'::integer[]))
  • Rows Removed by Filter: 45,084
5. 9.439 22.003 ↑ 1.0 18,147 3 / 3

Hash (cost=319.49..319.49 rows=18,149 width=20) (actual time=22.003..22.003 rows=18,147 loops=3)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,249kB
6. 12.564 12.564 ↑ 1.0 18,147 3 / 3

Seq Scan on boxing_in_place bip (cost=0.00..319.49 rows=18,149 width=20) (actual time=0.029..12.564 rows=18,147 loops=3)

7. 7,793.057 20,261.947 ↓ 0.0 0 4,675,834 / 3

Bitmap Heap Scan on place p (cost=925.21..933.23 rows=1 width=41) (actual time=0.013..0.013 rows=0 loops=4,675,834)

  • 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_type = ANY ('{4}'::integer[])) AND (parent_place_id = ANY ('{99}'::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,299,790
8. 1,558.611 12,468.891 ↓ 0.0 0 4,675,834 / 3

BitmapOr (cost=925.21..925.21 rows=3 width=0) (actual time=0.008..0.008 rows=0 loops=4,675,834)

9. 10,910.279 10,910.279 ↑ 1.0 2 4,675,834 / 3

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

  • Index Cond: ((place_id = iip.place_id) AND (place_type = iip.place_type))
10. 0.000 0.000 ↓ 0.0 0 4,675,834 / 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,834)

  • Index Cond: ((place_id = bip.place_id) AND (place_type = bip.place_type))
Planning time : 0.693 ms
Execution time : 30,122.428 ms