explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qizk

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

Nested Loop (cost=251,632.91..556,550.58 rows=1 width=847) (actual rows= loops=)

  • Join Filter: ((oi.product_id = (1)) AND (oi.instrument_id = e.expiry_id))
2. 0.000 0.000 ↓ 0.0

Append (cost=14.76..60,069.11 rows=151,317 width=764) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Result (cost=14.76..7,478.56 rows=743 width=764) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Append (cost=14.76..7,469.27 rows=743 width=760) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.76..28.61 rows=1 width=381) (actual rows= loops=)

  • Join Filter: (l.lot_limit_group_id = llg.lot_limit_group_id)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.76..17.81 rows=1 width=193) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.61..17.64 rows=1 width=197) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.48..17.40 rows=1 width=201) (actual rows= loops=)

  • Join Filter: (l.region_id = r.region_id)
9. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=14.34..17.12 rows=1 width=204) (actual rows= loops=)

  • Hash Cond: ((e2.contract_id = pc2.contract_id) AND (e2.expiration_date = e.expiration_date))
10. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e2 (cost=0.00..2.44 rows=44 width=20) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=14.33..14.33 rows=1 width=204) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=10.46..14.33 rows=1 width=204) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.31..14.14 rows=1 width=200) (actual rows= loops=)

  • Join Filter: (c.contract_id = pc.contract_id)
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.04..13.66 rows=1 width=188) (actual rows= loops=)

  • Hash Cond: ((c.contract_class_id = eli.contract_class_id) AND (c.contract_term_id = eli.contract_term_id) AND (l.region_id = eli.region_id) AND (e.expiry_lot_info_id = eli.expiry_lot_info_id) AND (e.expiration_date = eli.expiration_date))
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.07..11.11 rows=44 width=212) (actual rows= loops=)

  • Hash Cond: (e.contract_id = c.contract_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e (cost=0.00..2.44 rows=44 width=52) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=8.00..8.00 rows=5 width=160) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=6.58..8.00 rows=5 width=160) (actual rows= loops=)

  • Hash Cond: (c.commodity_type_id = com_t.commodity_type_id)
19. 0.000 0.000 ↓ 0.0

Hash Join (cost=5.47..6.87 rows=5 width=147) (actual rows= loops=)

  • Hash Cond: (c.contract_term_id = ct.contract_term_id)
20. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.38..5.75 rows=5 width=127) (actual rows= loops=)

  • Hash Cond: (c.contract_status_id = cs.contract_status_id)
21. 0.000 0.000 ↓ 0.0

Hash Join (cost=3.27..4.62 rows=5 width=131) (actual rows= loops=)

  • Hash Cond: (c.contract_class_id = cc.contract_class_id)
22. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.18..3.50 rows=5 width=113) (actual rows= loops=)

  • Hash Cond: (l.location_id = c.location_id)
23. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.07..2.33 rows=3 width=42) (actual rows= loops=)

  • Hash Cond: (lt.location_type_id = l.location_type_id)
24. 0.000 0.000 ↓ 0.0

Seq Scan on location_type lt (cost=0.00..1.14 rows=14 width=16) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=30) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on location l (cost=0.00..1.03 rows=3 width=30) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=87) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on contract c (cost=0.00..1.05 rows=5 width=87) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=1.04..1.04 rows=4 width=18) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on contract_class cc (cost=0.00..1.04 rows=4 width=18) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=12) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on contract_status cs (cost=0.00..1.05 rows=5 width=12) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=1.04..1.04 rows=4 width=20) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on contract_term ct (cost=0.00..1.04 rows=4 width=20) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=29) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on commodity_type com_t (cost=0.00..1.05 rows=5 width=29) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=30 width=44) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on expiry_lot_info eli (cost=0.00..1.30 rows=30 width=44) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Index Scan using physical_commodity_contract_id_instrument_type_id_key on physical_commodity pc (cost=0.27..0.47 rows=1 width=28) (actual rows= loops=)

  • Index Cond: ((contract_id = e.contract_id) AND (instrument_type_id = 2))
40. 0.000 0.000 ↓ 0.0

Index Scan using physical_commodity_pkey on physical_commodity pc2 (cost=0.15..0.18 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (physical_commodity_id = pc.parent_physical_commodity_id)
41. 0.000 0.000 ↓ 0.0

Index Scan using region_pkey on region r (cost=0.14..0.26 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (region_id = eli.region_id)
42. 0.000 0.000 ↓ 0.0

Index Scan using expiry_status_pkey on expiry_status es (cost=0.14..0.23 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (expiry_status_id = e.expiry_status_id)
43. 0.000 0.000 ↓ 0.0

Index Scan using commodity_group_pkey on commodity_group cg (cost=0.14..0.17 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (commodity_group_id = pc.commodity_group_id)
44. 0.000 0.000 ↓ 0.0

Seq Scan on lot_limit_group llg (cost=0.00..1.03 rows=3 width=10) (actual rows= loops=)

45.          

SubPlan (for Nested Loop)

46. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_10 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 2))
47. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_11 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 1))
48. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_12 (cost=0.76..2.98 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e.expiry_id) AND (trading_date = $19) AND (price_type_id = 2))
49.          

Initplan (for Index Scan)

50. 0.000 0.000 ↓ 0.0

Result (cost=0.32..0.33 rows=1 width=4) (actual rows= loops=)

51.          

Initplan (for Result)

52. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..0.32 rows=1 width=4) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Index Only Scan using business_calendar_i01 on business_calendar business_calendar_3 (cost=0.29..110.29 rows=3,309 width=4) (actual rows= loops=)

  • Index Cond: ((calendar_date IS NOT NULL) AND (calendar_date < ('now'::cstring)::date) AND (trading_day_indicator = true))
  • Filter: trading_day_indicator
54. 0.000 0.000 ↓ 0.0

Limit (cost=0.43..1.42 rows=1 width=18) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Index Scan Backward using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_13 (cost=0.43..461.20 rows=464 width=18) (actual rows= loops=)

  • Index Cond: (expiry_id = e.expiry_id)
56. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=110.09..7,440.65 rows=742 width=567) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=110.09..7,431.38 rows=742 width=563) (actual rows= loops=)

  • Join Filter: (c_1.lot_limit_group_id = llg_1.lot_limit_group_id)
58. 0.000 0.000 ↓ 0.0

Seq Scan on lot_limit_group llg_1 (cost=0.00..1.01 rows=1 width=21) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=110.09..211.61 rows=742 width=133) (actual rows= loops=)

  • Hash Cond: ((pc2_1.contract_id = e2_1.contract_id) AND (e_1.expiration_date = e2_1.expiration_date))
60. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=23.54..113.84 rows=742 width=133) (actual rows= loops=)

  • Hash Cond: (pc_1.parent_physical_commodity_id = pc2_1.physical_commodity_id)
61. 0.000 0.000 ↓ 0.0

Hash Join (cost=13.88..102.20 rows=742 width=129) (actual rows= loops=)

  • Hash Cond: (e_1.expiry_status_id = es_1.expiry_status_id)
62. 0.000 0.000 ↓ 0.0

Hash Join (cost=12.63..98.26 rows=742 width=133) (actual rows= loops=)

  • Hash Cond: (e_1.contract_id = c_1.contract_id)
63. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e_1 (cost=0.00..75.42 rows=742 width=48) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Hash (cost=12.58..12.58 rows=4 width=101) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.43..12.58 rows=4 width=101) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Hash Join (cost=3.29..11.88 rows=4 width=105) (actual rows= loops=)

  • Hash Cond: (c_1.contract_status_id = cs_1.contract_status_id)
67. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.18..10.75 rows=4 width=109) (actual rows= loops=)

  • Join Filter: (c_1.location_id = l_1.location_id)
68. 0.000 0.000 ↓ 0.0

Seq Scan on location l_1 (cost=0.00..1.01 rows=1 width=18) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.18..9.69 rows=4 width=107) (actual rows= loops=)

  • Hash Cond: (c_1.contract_term_id = ct_1.contract_term_id)
70. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.09..8.58 rows=4 width=103) (actual rows= loops=)

  • Hash Cond: (pc_1.contract_id = c_1.contract_id)
71. 0.000 0.000 ↓ 0.0

Seq Scan on physical_commodity pc_1 (cost=0.00..6.70 rows=296 width=28) (actual rows= loops=)

  • Filter: (instrument_type_id = 2)
72. 0.000 0.000 ↓ 0.0

Hash (cost=1.04..1.04 rows=4 width=75) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Seq Scan on contract c_1 (cost=0.00..1.04 rows=4 width=75) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Hash (cost=1.04..1.04 rows=4 width=20) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Seq Scan on contract_term ct_1 (cost=0.00..1.04 rows=4 width=20) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=12) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Seq Scan on contract_status cs_1 (cost=0.00..1.05 rows=5 width=12) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Index Scan using commodity_group_pkey on commodity_group cg_1 (cost=0.14..0.17 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (commodity_group_id = pc_1.commodity_group_id)
79. 0.000 0.000 ↓ 0.0

Hash (cost=1.11..1.11 rows=11 width=12) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on expiry_status es_1 (cost=0.00..1.11 rows=11 width=12) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Hash (cost=5.96..5.96 rows=296 width=20) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Seq Scan on physical_commodity pc2_1 (cost=0.00..5.96 rows=296 width=20) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Hash (cost=75.42..75.42 rows=742 width=20) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e2_1 (cost=0.00..75.42 rows=742 width=20) (actual rows= loops=)

85.          

SubPlan (for Nested Loop)

86. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_6 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_1.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 2))
87. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_7 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_1.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 1))
88. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_8 (cost=0.76..2.98 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_1.expiry_id) AND (trading_date = $13) AND (price_type_id = 2))
89.          

Initplan (for Index Scan)

90. 0.000 0.000 ↓ 0.0

Result (cost=0.32..0.33 rows=1 width=4) (actual rows= loops=)

91.          

Initplan (for Result)

92. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..0.32 rows=1 width=4) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Index Only Scan using business_calendar_i01 on business_calendar business_calendar_2 (cost=0.29..110.29 rows=3,309 width=4) (actual rows= loops=)

  • Index Cond: ((calendar_date IS NOT NULL) AND (calendar_date < ('now'::cstring)::date) AND (trading_day_indicator = true))
  • Filter: trading_day_indicator
94. 0.000 0.000 ↓ 0.0

Limit (cost=0.43..1.42 rows=1 width=18) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Index Scan Backward using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_9 (cost=0.43..461.20 rows=464 width=18) (actual rows= loops=)

  • Index Cond: (expiry_id = e_1.expiry_id)
96. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=0.00..11,757.10 rows=145,758 width=702) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Seq Scan on src_vw_expiry vw (cost=0.00..9,935.12 rows=145,758 width=459) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=256.61..27,607.39 rows=3,265 width=597) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Hash Join (cost=256.61..27,566.58 rows=3,265 width=593) (actual rows= loops=)

  • Hash Cond: (c_2.settlement_type_id = st.settlement_type_id)
100. 0.000 0.000 ↓ 0.0

Hash Join (cost=255.56..461.36 rows=3,265 width=220) (actual rows= loops=)

  • Hash Cond: (pc_2.commodity_group_id = cg_2.commodity_group_id)
101. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=251.56..448.38 rows=3,265 width=224) (actual rows= loops=)

  • Hash Cond: ((e2_2.contract_id = pc2_2.contract_id) AND (e2_2.expiration_date = e_2.expiration_date))
102. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e2_2 (cost=0.00..86.65 rows=3,265 width=20) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Hash (cost=202.58..202.58 rows=3,265 width=224) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=50.98..202.58 rows=3,265 width=224) (actual rows= loops=)

  • Hash Cond: (pc_2.parent_physical_commodity_id = pc2_2.physical_commodity_id)
105. 0.000 0.000 ↓ 0.0

Hash Join (cost=41.32..184.23 rows=3,265 width=220) (actual rows= loops=)

  • Hash Cond: (e_2.expiry_status_id = es_2.expiry_status_id)
106. 0.000 0.000 ↓ 0.0

Hash Join (cost=40.03..171.57 rows=3,265 width=220) (actual rows= loops=)

  • Hash Cond: (e_2.contract_id = c_2.contract_id)
107. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e_2 (cost=0.00..86.65 rows=3,265 width=36) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Hash (cost=36.58..36.58 rows=276 width=200) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Hash Join (cost=12.67..36.58 rows=276 width=200) (actual rows= loops=)

  • Hash Cond: (c_2.contract_id = pc_2.contract_id)
110. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.27..25.44 rows=276 width=172) (actual rows= loops=)

  • Hash Cond: (c_2.contract_status_id = cs_2.contract_status_id)
111. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.16..23.00 rows=276 width=170) (actual rows= loops=)

  • Join Filter: (c_2.lot_limit_group_id = llg_2.lot_limit_group_id)
112. 0.000 0.000 ↓ 0.0

Seq Scan on lot_limit_group llg_2 (cost=0.00..1.01 rows=1 width=23) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.16..18.54 rows=276 width=151) (actual rows= loops=)

  • Hash Cond: (c_2.volume_unit_id = vu.volume_unit_id)
114. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..16.22 rows=276 width=149) (actual rows= loops=)

  • Join Filter: (c_2.contract_term_id = ct_2.contract_term_id)
115. 0.000 0.000 ↓ 0.0

Seq Scan on contract_term ct_2 (cost=0.00..1.01 rows=1 width=10) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Seq Scan on contract c_2 (cost=0.00..11.76 rows=276 width=145) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=7 width=8) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Seq Scan on volume_unit vu (cost=0.00..1.07 rows=7 width=8) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=12) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Seq Scan on contract_status cs_2 (cost=0.00..1.05 rows=5 width=12) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Hash (cost=6.70..6.70 rows=296 width=28) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Seq Scan on physical_commodity pc_2 (cost=0.00..6.70 rows=296 width=28) (actual rows= loops=)

  • Filter: (instrument_type_id = 2)
123. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=6) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Seq Scan on expiry_status es_2 (cost=0.00..1.13 rows=13 width=6) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Hash (cost=5.96..5.96 rows=296 width=20) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Seq Scan on physical_commodity pc2_2 (cost=0.00..5.96 rows=296 width=20) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Hash (cost=2.89..2.89 rows=89 width=12) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Seq Scan on commodity_group cg_2 (cost=0.00..2.89 rows=89 width=12) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

Hash (cost=1.02..1.02 rows=2 width=11) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Seq Scan on settlement_type st (cost=0.00..1.02 rows=2 width=11) (actual rows= loops=)

131.          

SubPlan (for Hash Join)

132. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_3 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_2.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 2))
133. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_4 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_2.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 1))
134. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_5 (cost=0.76..2.98 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_2.expiry_id) AND (trading_date = $8) AND (price_type_id = 2))
135.          

Initplan (for Index Scan)

136. 0.000 0.000 ↓ 0.0

Result (cost=0.32..0.33 rows=1 width=4) (actual rows= loops=)

137.          

Initplan (for Result)

138. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..0.32 rows=1 width=4) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

Index Only Scan using business_calendar_i01 on business_calendar business_calendar_1 (cost=0.29..110.29 rows=3,309 width=4) (actual rows= loops=)

  • Index Cond: ((calendar_date IS NOT NULL) AND (calendar_date < ('now'::cstring)::date) AND (trading_day_indicator = true))
  • Filter: trading_day_indicator
140. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=186.96..13,226.06 rows=1,551 width=578) (actual rows= loops=)

141. 0.000 0.000 ↓ 0.0

Nested Loop (cost=186.96..13,206.67 rows=1,551 width=574) (actual rows= loops=)

  • Join Filter: (c_3.settlement_type_id = st_1.settlement_type_id)
142. 0.000 0.000 ↓ 0.0

Seq Scan on settlement_type st_1 (cost=0.00..1.01 rows=1 width=12) (actual rows= loops=)

143. 0.000 0.000 ↓ 0.0

Hash Join (cost=186.96..323.46 rows=1,551 width=204) (actual rows= loops=)

  • Hash Cond: (pc_3.commodity_group_id = cg_3.commodity_group_id)
144. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=182.96..315.19 rows=1,551 width=208) (actual rows= loops=)

  • Hash Cond: ((e2_3.contract_id = pc2_3.contract_id) AND (e2_3.expiration_date = e_3.expiration_date))
145. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e2_3 (cost=0.00..104.51 rows=1,551 width=20) (actual rows= loops=)

146. 0.000 0.000 ↓ 0.0

Hash (cost=159.70..159.70 rows=1,551 width=208) (actual rows= loops=)

147. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=23.94..159.70 rows=1,551 width=208) (actual rows= loops=)

  • Hash Cond: (pc_3.parent_physical_commodity_id = pc2_3.physical_commodity_id)
148. 0.000 0.000 ↓ 0.0

Hash Join (cost=14.28..145.91 rows=1,551 width=204) (actual rows= loops=)

  • Hash Cond: (e_3.expiry_status_id = es_3.expiry_status_id)
149. 0.000 0.000 ↓ 0.0

Hash Join (cost=13.05..138.89 rows=1,551 width=204) (actual rows= loops=)

  • Hash Cond: (e_3.contract_id = c_3.contract_id)
150. 0.000 0.000 ↓ 0.0

Seq Scan on expiry e_3 (cost=0.00..104.51 rows=1,551 width=40) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Hash (cost=12.91..12.91 rows=11 width=180) (actual rows= loops=)

152. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.76..12.91 rows=11 width=180) (actual rows= loops=)

  • Join Filter: (c_3.lot_limit_group_id = llg_3.lot_limit_group_id)
153. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.76..11.74 rows=11 width=158) (actual rows= loops=)

  • Join Filter: (c_3.volume_unit_id = vu_1.volume_unit_id)
154. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.76..10.56 rows=11 width=156) (actual rows= loops=)

  • Join Filter: (c_3.contract_term_id = ct_3.contract_term_id)
155. 0.000 0.000 ↓ 0.0

Merge Join (cost=8.76..9.38 rows=11 width=152) (actual rows= loops=)

  • Merge Cond: (pc_3.contract_id = c_3.contract_id)
156. 0.000 0.000 ↓ 0.0

Index Scan using physical_commodity_contract_id_instrument_type_id_key on physical_commodity pc_3 (cost=0.27..13.04 rows=296 width=28) (actual rows= loops=)

  • Index Cond: (instrument_type_id = 2)
157. 0.000 0.000 ↓ 0.0

Sort (cost=2.46..2.49 rows=11 width=124) (actual rows= loops=)

  • Sort Key: c_3.contract_id
158. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.11..2.27 rows=11 width=124) (actual rows= loops=)

  • Hash Cond: (c_3.contract_status_id = cs_3.contract_status_id)
159. 0.000 0.000 ↓ 0.0

Seq Scan on contract c_3 (cost=0.00..1.11 rows=11 width=124) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=6) (actual rows= loops=)

161. 0.000 0.000 ↓ 0.0

Seq Scan on contract_status cs_3 (cost=0.00..1.05 rows=5 width=6) (actual rows= loops=)

162. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.01 rows=1 width=10) (actual rows= loops=)

163. 0.000 0.000 ↓ 0.0

Seq Scan on contract_term ct_3 (cost=0.00..1.01 rows=1 width=10) (actual rows= loops=)

164. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Seq Scan on volume_unit vu_1 (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

166. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.01 rows=1 width=26) (actual rows= loops=)

167. 0.000 0.000 ↓ 0.0

Seq Scan on lot_limit_group llg_3 (cost=0.00..1.01 rows=1 width=26) (actual rows= loops=)

168. 0.000 0.000 ↓ 0.0

Hash (cost=1.10..1.10 rows=10 width=6) (actual rows= loops=)

169. 0.000 0.000 ↓ 0.0

Seq Scan on expiry_status es_3 (cost=0.00..1.10 rows=10 width=6) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Hash (cost=5.96..5.96 rows=296 width=20) (actual rows= loops=)

171. 0.000 0.000 ↓ 0.0

Seq Scan on physical_commodity pc2_3 (cost=0.00..5.96 rows=296 width=20) (actual rows= loops=)

172. 0.000 0.000 ↓ 0.0

Hash (cost=2.89..2.89 rows=89 width=12) (actual rows= loops=)

173. 0.000 0.000 ↓ 0.0

Seq Scan on commodity_group cg_3 (cost=0.00..2.89 rows=89 width=12) (actual rows= loops=)

174.          

SubPlan (for Nested Loop)

175. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_3.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 2))
176. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_1 (cost=0.43..2.65 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_3.expiry_id) AND (trading_date = ('now'::cstring)::date) AND (price_type_id = 1))
177. 0.000 0.000 ↓ 0.0

Index Scan using expiry_settlement_price_pkey on expiry_settlement_price expiry_settlement_price_2 (cost=0.76..2.98 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((expiry_id = e_3.expiry_id) AND (trading_date = $3) AND (price_type_id = 2))
178.          

Initplan (for Index Scan)

179. 0.000 0.000 ↓ 0.0

Result (cost=0.32..0.33 rows=1 width=4) (actual rows= loops=)

180.          

Initplan (for Result)

181. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..0.32 rows=1 width=4) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Index Only Scan using business_calendar_i01 on business_calendar (cost=0.29..110.29 rows=3,309 width=4) (actual rows= loops=)

  • Index Cond: ((calendar_date IS NOT NULL) AND (calendar_date < ('now'::cstring)::date) AND (trading_day_indicator = true))
  • Filter: trading_day_indicator
183. 0.000 0.000 ↓ 0.0

Materialize (cost=251,618.15..489,672.21 rows=2 width=83) (actual rows= loops=)

184. 0.000 0.000 ↓ 0.0

Gather (cost=251,618.15..489,672.20 rows=2 width=83) (actual rows= loops=)

  • Workers Planned: 5
185. 0.000 0.000 ↓ 0.0

Hash Join (cost=250,618.15..488,672.00 rows=1 width=83) (actual rows= loops=)

  • Hash Cond: (oi.generated_order_id = go.id)
186. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on order_instrument oi (cost=0.00..228,441.29 rows=3,661,929 width=21) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

Hash (cost=250,618.14..250,618.14 rows=1 width=62) (actual rows= loops=)

  • -> Seq Scan on generated_order go (cost=0.00..250618.14 rows=1 width=62)" Filter: (pricing_run_id = 470)