explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t6EN : 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 1,361.438 ↓ 0.0 0 1

Nested Loop (cost=9.84..707.13 rows=1 width=188) (actual time=1,361.438..1,361.438 rows=0 loops=1)

  • Join Filter: ((facinfo.facility_id_)::text = (prostosta.facility_id_)::text)
2. 0.033 1,361.265 ↓ 27.0 27 1

Nested Loop Left Join (cost=9.30..702.19 rows=1 width=331) (actual time=1,351.688..1,361.265 rows=27 loops=1)

3. 0.036 1,361.178 ↓ 27.0 27 1

Nested Loop Left Join (cost=8.74..699.18 rows=1 width=326) (actual time=1,351.680..1,361.178 rows=27 loops=1)

4. 25.115 1,361.088 ↓ 27.0 27 1

Nested Loop (cost=8.19..696.18 rows=1 width=321) (actual time=1,351.671..1,361.088 rows=27 loops=1)

5. 22.231 1,012.939 ↓ 53,839.0 53,839 1

Nested Loop (cost=7.63..693.17 rows=1 width=353) (actual time=0.184..1,012.939 rows=53,839 loops=1)

6. 22.869 883.030 ↓ 53,839.0 53,839 1

Nested Loop (cost=7.35..690.70 rows=1 width=385) (actual time=0.176..883.030 rows=53,839 loops=1)

7. 47.987 752.483 ↓ 53,839.0 53,839 1

Nested Loop (cost=7.07..688.31 rows=1 width=332) (actual time=0.167..752.483 rows=53,839 loops=1)

8. 23.650 542.979 ↓ 53,839.0 53,839 1

Nested Loop (cost=6.65..685.68 rows=1 width=222) (actual time=0.154..542.979 rows=53,839 loops=1)

9. 10.074 142.456 ↓ 53,839.0 53,839 1

Nested Loop (cost=6.10..682.80 rows=1 width=141) (actual time=0.138..142.456 rows=53,839 loops=1)

10. 4.385 65.832 ↓ 6,655.0 6,655 1

Nested Loop (cost=5.55..678.22 rows=1 width=178) (actual time=0.119..65.832 rows=6,655 loops=1)

11. 6.565 14.862 ↓ 1,331.0 6,655 1

Hash Join (cost=4.99..655.26 rows=5 width=140) (actual time=0.102..14.862 rows=6,655 loops=1)

  • Hash Cond: ((orderinfo.delivery_facility_)::text = (facinfo.facility_id_)::text)
12. 8.240 8.240 ↓ 47.9 6,655 1

Index Scan using order_info_idx01 on order_info orderinfo (cost=0.42..650.13 rows=139 width=81) (actual time=0.030..8.240 rows=6,655 loops=1)

  • Index Cond: (((site_id_)::text = 'VA2301'::text) AND ((order_category_id_)::text = 'C044ODTYPESO'::text) AND ((serial_item_flag_)::text = '1'::text))
13. 0.007 0.057 ↑ 1.0 4 1

Hash (cost=4.51..4.51 rows=4 width=59) (actual time=0.057..0.057 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 0.050 0.050 ↑ 1.0 4 1

Seq Scan on facility_info facinfo (cost=0.00..4.51 rows=4 width=59) (actual time=0.048..0.050 rows=4 loops=1)

  • Filter: ((site_id_)::text = 'VA2301'::text)
  • Rows Removed by Filter: 119
15. 46.585 46.585 ↑ 1.0 1 6,655

Index Scan using sales_order_idx02 on sales_order salesorder (cost=0.56..4.58 rows=1 width=38) (actual time=0.007..0.007 rows=1 loops=6,655)

  • Index Cond: (((site_id_)::text = 'VA2301'::text) AND ((order_id_)::text = (orderinfo.order_id_)::text))
16. 66.550 66.550 ↑ 1.5 8 6,655

Index Only Scan using sales_order_item_idx02 on sales_order_item salordite (cost=0.55..4.46 rows=12 width=68) (actual time=0.008..0.010 rows=8 loops=6,655)

  • Index Cond: ((sales_order_id_ = (salesorder.order_id_)::text) AND (site_id_ = 'VA2301'::text))
  • Heap Fetches: 79
17. 376.873 376.873 ↑ 1.0 1 53,839

Index Scan using order_item_idx03 on order_item orderitem (cost=0.56..2.87 rows=1 width=81) (actual time=0.006..0.007 rows=1 loops=53,839)

  • Index Cond: (((site_id_)::text = 'VA2301'::text) AND ((order_item_id_)::text = (salordite.order_item_id_)::text))
18. 161.517 161.517 ↑ 1.0 1 53,839

Index Scan using pk_product on product (cost=0.42..2.61 rows=1 width=110) (actual time=0.003..0.003 rows=1 loops=53,839)

  • Index Cond: ((product_id_)::text = (orderitem.product_id_)::text)
19. 107.678 107.678 ↑ 1.0 1 53,839

Index Scan using pk_organization_info on organization_info originfo (cost=0.28..2.38 rows=1 width=53) (actual time=0.002..0.002 rows=1 loops=53,839)

  • Index Cond: ((party_id_)::text = (salesorder.customer_id_)::text)
20. 107.678 107.678 ↑ 1.0 1 53,839

Index Scan using pk_party_info on party_info partyinfo (cost=0.28..2.46 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=53,839)

  • Index Cond: ((party_id_)::text = (salesorder.customer_id_)::text)
21. 323.034 323.034 ↓ 0.0 0 53,839

Index Scan using order_item_progress_idx01 on order_item_progress boorderitrmproqty (cost=0.56..3.00 rows=1 width=42) (actual time=0.006..0.006 rows=0 loops=53,839)

  • Index Cond: (((order_item_id_)::text = (orderitem.order_item_id_)::text) AND ((order_item_progress_type_id_)::text = 'C041BACKORDERQTY'::text))
  • Filter: (quantity_ > 0::numeric)
22. 0.054 0.054 ↓ 0.0 0 27

Index Scan using order_item_progress_idx01 on order_item_progress alloorderitrmproqty (cost=0.56..2.99 rows=1 width=42) (actual time=0.002..0.002 rows=0 loops=27)

  • Index Cond: (((order_item_id_)::text = (orderitem.order_item_id_)::text) AND ((order_item_progress_type_id_)::text = 'C041ALLOCATEDQTY'::text))
23. 0.054 0.054 ↓ 0.0 0 27

Index Scan using order_item_progress_idx01 on order_item_progress pickorderitrmproqty (cost=0.56..2.99 rows=1 width=42) (actual time=0.002..0.002 rows=0 loops=27)

  • Index Cond: (((order_item_id_)::text = (orderitem.order_item_id_)::text) AND ((order_item_progress_type_id_)::text = 'C041ONSHIPPINGQTY'::text))
24. 0.162 0.162 ↓ 0.0 0 27

Index Only Scan using product_stock_status_idx02 on product_stock_status prostosta (cost=0.55..3.37 rows=1 width=78) (actual time=0.006..0.006 rows=0 loops=27)

  • Index Cond: ((site_id_ = 'VA2301'::text) AND (facility_id_ = (orderinfo.delivery_facility_)::text) AND (product_id_ = (product.product_id_)::text) AND (product_stock_status_type_id_ = 'C071ONHANDQTY'::text) AND (quantity_ > 0::numeric))
  • Heap Fetches: 0
25.          

SubPlan (forNested Loop)

26. 0.000 0.000 ↓ 0.0 0

Seq Scan on color_info colorinfo (cost=0.00..1.56 rows=1 width=98) (never executed)

  • Filter: ((color_id_)::text = (product.color_id_)::text)
Planning time : 13.440 ms
Execution time : 1,361.763 ms