explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PXpZ

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.123 4,966.111 ↓ 19.0 19 1

HashAggregate (cost=25,274.19..25,274.20 rows=1 width=21) (actual time=4,966.107..4,966.111 rows=19 loops=1)

  • Group Key: soitem.sales_order_id_
2. 15.030 4,965.988 ↓ 47.0 47 1

Nested Loop (cost=19.50..25,274.19 rows=1 width=21) (actual time=737.179..4,965.988 rows=47 loops=1)

3. 11.633 647.568 ↓ 859.8 9,458 1

Nested Loop (cost=18.94..25,250.65 rows=11 width=58) (actual time=70.475..647.568 rows=9,458 loops=1)

4. 146.473 146.473 ↓ 148.1 2,813 1

Index Scan using order_info_idx02 on order_info orderinfo (cost=0.56..7,106.39 rows=19 width=37) (actual time=9.606..146.473 rows=2,813 loops=1)

  • Index Cond: (((site_id_)::text = 'JA0004'::text) AND ((non_serial_item_flag_)::text = '1'::text) AND ((order_date_)::text >= '20190601'::text) AND ((order_date_)::text <= '20190701'::text))
  • Filter: ((delivery_facility_)::text = 'af2ff7d0-ece9-463f-9c62-52fe4a627520'::text)
5. 61.886 489.462 ↑ 164.3 3 2,813

Bitmap Heap Scan on sales_order_item soitem (cost=18.38..950.03 rows=493 width=58) (actual time=0.172..0.174 rows=3 loops=2,813)

  • Recheck Cond: ((sales_order_id_)::text = (orderinfo.order_id_)::text)
  • Heap Blocks: exact=2713
6. 427.576 427.576 ↑ 164.3 3 2,813

Bitmap Index Scan on sales_order_item_idx02 (cost=0.00..18.26 rows=493 width=0) (actual time=0.152..0.152 rows=3 loops=2,813)

  • Index Cond: ((sales_order_id_)::text = (orderinfo.order_id_)::text)
7. 4,303.390 4,303.390 ↓ 0.0 0 9,458

Index Only Scan using order_item_progress_idx01 on order_item_progress itemprogress (cost=0.56..2.13 rows=1 width=37) (actual time=0.455..0.455 rows=0 loops=9,458)

  • Index Cond: ((order_item_id_ = (soitem.order_item_id_)::text) AND (order_item_progress_type_id_ = 'C041ALLOCATEDQTY'::text))
  • Heap Fetches: 47
Planning time : 0.720 ms
Execution time : 4,966.200 ms