explain.depesz.com

PostgreSQL's explain analyze made readable

Result: V3N8

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,270.12..1,475.12 rows=3 width=1,680) (actual rows= loops=)

  • Hash Cond: ((orderposit0_.op_cc_pos_id = deliverysc27_.positionid) AND (orderposit0_.op_cc_head_id = deliverysc27_.headid))
  • Join Filter: (order3_.oh_ord_type = 6)
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=113.29..293.14 rows=3 width=717) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=113.02..292.26 rows=3 width=705) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=112.89..291.81 rows=3 width=696) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=112.74..291.32 rows=3 width=681) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=74.25..151.81 rows=3 width=616) (actual rows= loops=)

  • Join Filter: (handlingun13_.hutar_hut_id = handlingun15_.hut_id)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=71.59..146.88 rows=3 width=574) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=70.46..95.19 rows=3 width=317) (actual rows= loops=)

  • Join Filter: (handlingun13_.hutar_ar_id = orderposit0_.op_cc_artnr)
9. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=70.03..77.19 rows=3 width=231) (actual rows= loops=)

  • Hash Cond: (country8_.co_id = orderposit0_.op_origin_co_id)
10. 0.000 0.000 ↓ 0.0

Seq Scan on country country8_ (cost=0.00..5.55 rows=255 width=19) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=70.00..70.00 rows=3 width=212) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.84..70.00 rows=3 width=212) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.56..68.43 rows=3 width=198) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=10.28..67.52 rows=3 width=194) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.99..65.95 rows=3 width=180) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.71..65.05 rows=3 width=176) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.42..40.12 rows=3 width=143) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.27..39.63 rows=3 width=128) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on ord_pos orderposit0_ (cost=8.86..20.68 rows=3 width=65) (actual rows= loops=)

  • Recheck Cond: (((op_cc_head_id = 100,015,150) AND (op_cc_pos_id = 1)) OR ((op_cc_head_id = 100,015,158) AND (op_cc_pos_id = 1)))
20. 0.000 0.000 ↓ 0.0

BitmapOr (cost=8.86..8.86 rows=3 width=0) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx9_ord_pos (cost=0.00..4.43 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((op_cc_head_id = 100,015,150) AND (op_cc_pos_id = 1))
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx9_ord_pos (cost=0.00..4.43 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((op_cc_head_id = 100,015,158) AND (op_cc_pos_id = 1))
23. 0.000 0.000 ↓ 0.0

Index Scan using pk_ord_pos_addon on ord_pos_addon orderposit1_ (cost=0.42..12.22 rows=2 width=71) (actual rows= loops=)

  • Index Cond: ((opao_op_cc_head_id = orderposit0_.op_cc_head_id) AND (opao_op_cc_pos_id = orderposit0_.op_cc_pos_id) AND (opao_op_cc_pos_id = 1))
24. 0.000 0.000 ↓ 0.0

Index Scan using pk_country on country country2_ (cost=0.14..0.16 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (co_id = orderposit1_.opao_cumul_co_id)
25. 0.000 0.000 ↓ 0.0

Index Scan using idx1_ord_head on ord_head order3_ (cost=0.29..8.31 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (oh_head_id = orderposit0_.op_cc_head_id)
26. 0.000 0.000 ↓ 0.0

Index Only Scan using idx12_comp_cat_mtc on comp_cat_mtc companycat4_ (cost=0.28..0.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (cocam_id = order3_.oh_cust_cocam_id)
27. 0.000 0.000 ↓ 0.0

Index Scan using pk_company on company company5_ (cost=0.29..0.52 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (cp_id = companycat4_.cocam_cp_id)
28. 0.000 0.000 ↓ 0.0

Index Only Scan using idx12_comp_cat_mtc on comp_cat_mtc companycat6_ (cost=0.28..0.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (cocam_id = order3_.oh_cocam_id)
29. 0.000 0.000 ↓ 0.0

Index Scan using pk_company on company company7_ (cost=0.29..0.52 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (cp_id = companycat6_.cocam_cp_id)
30. 0.000 0.000 ↓ 0.0

Materialize (cost=0.42..17.92 rows=2 width=86) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.42..17.91 rows=2 width=86) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on pck_handling_unit_type_article_restriction handlingun13_ (cost=0.00..1.02 rows=2 width=17) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Index Scan using idx2_art_root on art_root articleroo14_ (cost=0.42..8.44 rows=1 width=73) (actual rows= loops=)

  • Index Cond: (ar_cc_artnr = handlingun13_.hutar_ar_id)
34. 0.000 0.000 ↓ 0.0

Limit (cost=1.13..17.21 rows=1 width=5,545) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..17.21 rows=1 width=5,545) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..12.76 rows=1 width=261) (actual rows= loops=)

  • Join Filter: (ccartstsup20_.ass_sup_id = order22_.oh_cocam_id)
37. 0.000 0.000 ↓ 0.0

Index Scan using pk_art_st_su on art_st_su ccartstsup20_ (cost=0.42..8.44 rows=1 width=257) (actual rows= loops=)

  • Index Cond: (ass_cc_artnr = orderposit0_.op_cc_artnr)
38. 0.000 0.000 ↓ 0.0

Index Only Scan using idx1_ord_head on ord_head order22_ (cost=0.29..4.31 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (oh_head_id = orderposit0_.op_cc_head_id)
39. 0.000 0.000 ↓ 0.0

Index Only Scan using idx9_ord_pos on ord_pos orderposit21_ (cost=0.42..4.44 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((op_cc_head_id = orderposit0_.op_cc_head_id) AND (op_cc_pos_id = orderposit0_.op_cc_pos_id))
40. 0.000 0.000 ↓ 0.0

Materialize (cost=2.66..4.12 rows=19 width=46) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.66..4.03 rows=19 width=46) (actual rows= loops=)

  • Hash Cond: (handlingun15_.hut_id = localized17_.lhut_handling_unit_type_id)
42. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.35..2.65 rows=19 width=25) (actual rows= loops=)

  • Hash Cond: ((handlingun15_.hut_id = localized16_.lhut_handling_unit_type_id) AND (handlingun15_.hut_def_language = localized16_.lhut_language))
43. 0.000 0.000 ↓ 0.0

Seq Scan on pck_handling_unit_type handlingun15_ (cost=0.00..1.19 rows=19 width=8) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=1.14..1.14 rows=14 width=29) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on pck_localized_handling_unit_type localized16_ (cost=0.00..1.14 rows=14 width=29) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Hash (cost=1.18..1.18 rows=11 width=25) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on pck_localized_handling_unit_type localized17_ (cost=0.00..1.18 rows=11 width=25) (actual rows= loops=)

  • Filter: (lhut_language = 1)
48. 0.000 0.000 ↓ 0.0

Index Scan using idx1_party on party party18_ (cost=38.49..46.51 rows=1 width=73) (actual rows= loops=)

  • Index Cond: (p_id = COALESCE((SubPlan 2), (SubPlan 3), (SubPlan 4)))
49.          

SubPlan (for Index Scan)

50. 0.000 0.000 ↓ 0.0

Index Scan using idx1_party on party party19_ (cost=0.42..8.44 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (p_id = orderposit0_.op_fdel_p_id)
  • Filter: ((p_street IS NOT NULL) AND (p_zip IS NOT NULL) AND (p_city IS NOT NULL))
51. 0.000 0.000 ↓ 0.0

Index Scan using idx1_party on party party20_ (cost=0.42..8.44 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (p_id = orderposit0_.op_del_p_id)
  • Filter: ((p_street IS NOT NULL) AND (p_zip IS NOT NULL) AND (p_city IS NOT NULL))
52. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..21.19 rows=1 width=4) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..16.75 rows=1 width=8) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Index Scan using idx1_ord_head on ord_head order23_ (cost=0.29..8.31 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (oh_head_id = orderposit0_.op_cc_head_id)
55. 0.000 0.000 ↓ 0.0

Index Scan using idx1_party on party party21_ (cost=0.42..8.44 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (p_id = order23_.oh_del_p_id)
  • Filter: ((p_street IS NOT NULL) AND (p_zip IS NOT NULL) AND (p_city IS NOT NULL))
56. 0.000 0.000 ↓ 0.0

Index Only Scan using idx9_ord_pos on ord_pos orderposit22_ (cost=0.42..4.44 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((op_cc_head_id = orderposit0_.op_cc_head_id) AND (op_cc_pos_id = orderposit0_.op_cc_pos_id))
57. 0.000 0.000 ↓ 0.0

Index Scan using pk_country on country country24_ (cost=0.14..0.16 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (co_id = party18_.p_co_id)
58. 0.000 0.000 ↓ 0.0

Index Scan using idx2_language on language language25_ (cost=0.13..0.15 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (lan_id = party18_.p_lan_id)
59. 0.000 0.000 ↓ 0.0

Index Only Scan using idx2_region on region region26_ (cost=0.28..0.29 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (reg_id = party18_.p_reg_id)
60. 0.000 0.000 ↓ 0.0

Hash (cost=1,156.75..1,156.75 rows=5 width=48) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Subquery Scan on deliverysc27_ (cost=1,156.54..1,156.75 rows=5 width=48) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,156.54..1,156.70 rows=5 width=48) (actual rows= loops=)

  • Group Key: deliverysc1_.dsp_op_cc_head_id, deliverysc1_.dsp_op_cc_pos_id
63. 0.000 0.000 ↓ 0.0

Sort (cost=1,156.54..1,156.55 rows=5 width=24) (actual rows= loops=)

  • Sort Key: deliverysc1_.dsp_op_cc_head_id
64. 0.000 0.000 ↓ 0.0

Nested Loop (cost=120.48..1,156.48 rows=5 width=24) (actual rows= loops=)

  • Join Filter: ((deliverysc1_.dsp_op_cc_head_id = order3__1.oh_head_id) AND (companyent4_.cocom_cocam_id1 = order3__1.oh_cust_cocam_id))
65. 0.000 0.000 ↓ 0.0

Nested Loop (cost=120.19..989.94 rows=317 width=32) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Hash Join (cost=119.77..720.11 rows=206 width=28) (actual rows= loops=)

  • Hash Cond: (deliverysc0_.dspc_dsp_id = deliverysc1_.dsp_id)
  • Join Filter: (((companyent4_.cocom_dispatch_n_qty_periode > 0) AND (deliverysc0_.dspc_del_date_from <= ((CURRENT_TIMESTAMP + ((companyent4_.cocom_dispatch_n_qty_periode)::double precision * '7 days'::interval)) + (((1 * ((7 - (date_part('dow'::text, CURRENT_TIMESTAMP))::integer) + 1)))::double precision * '1 day'::interval)))) OR ((companyent4_.cocom_dispatch_n_qty_periode IS NULL) AND (deliverysc0_.dspc_del_date_from <= (SubPlan 5))))
67. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..597.04 rows=1,363 width=28) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Index Scan using idx9_comp_comp_mtc on comp_comp_mtc companyent4_ (cost=0.29..8.30 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (cocom_cocam_id2 = 5)
69. 0.000 0.000 ↓ 0.0

Seq Scan on delivery_schedule_pos_classification deliverysc0_ (cost=0.00..575.11 rows=1,363 width=20) (actual rows= loops=)

  • Filter: (dspc_status = 10)
70. 0.000 0.000 ↓ 0.0

Hash (cost=108.89..108.89 rows=848 width=12) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Seq Scan on delivery_schedule_pos deliverysc1_ (cost=0.00..108.89 rows=848 width=12) (actual rows= loops=)

  • Filter: (dsp_op_cc_pos_id = 1)
72.          

SubPlan (for Hash Join)

73. 0.000 0.000 ↓ 0.0

Limit (cost=668.29..668.29 rows=1 width=8) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Sort (cost=668.29..668.29 rows=1 width=8) (actual rows= loops=)

  • Sort Key: deliverysc5_.dspc_del_date_from
75. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..668.28 rows=1 width=8) (actual rows= loops=)

  • Join Filter: (deliverysc5_.dspc_dsp_id = deliverysc6_.dsp_id)
76. 0.000 0.000 ↓ 0.0

Index Scan using fk1_delivery_schedule_pos on delivery_schedule_pos deliverysc6_ (cost=0.28..8.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((dsp_op_cc_head_id = deliverysc1_.dsp_op_cc_head_id) AND (dsp_op_cc_pos_id = deliverysc1_.dsp_op_cc_pos_id))
77. 0.000 0.000 ↓ 0.0

Seq Scan on delivery_schedule_pos_classification deliverysc5_ (cost=0.00..659.56 rows=34 width=12) (actual rows= loops=)

  • Filter: ((dspc_status = 10) AND (dspc_del_date_from > CURRENT_TIMESTAMP))
78. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_ord_pos on ord_pos orderposit2_ (cost=0.42..2.20 rows=2 width=8) (actual rows= loops=)

  • Index Cond: ((op_cc_head_id = deliverysc1_.dsp_op_cc_head_id) AND (op_cc_pos_id = 1))
79. 0.000 0.000 ↓ 0.0

Index Scan using pk_ord_head on ord_head order3__1 (cost=0.29..0.51 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (oh_head_id = orderposit2_.op_cc_head_id)
80.          

SubPlan (for Hash Left Join)

81. 0.000 0.000 ↓ 0.0

Result (cost=0.29..8.30 rows=1 width=4) (actual rows= loops=)

  • One-Time Filter: (country8_.co_id IS NOT NULL)
82. 0.000 0.000 ↓ 0.0

Index Scan using pk_sup_dec_ctrl on sup_dec_ctrl ccsupdecct35_ (cost=0.29..8.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((sdc_op_cc_head_id = orderposit0_.op_cc_head_id) AND (sdc_op_cc_pos_id = orderposit0_.op_cc_pos_id))