explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 64wf

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

Limit (cost=87,639.67..634,210.36 rows=10 width=82) (actual time=0.143..0.143 rows=0 loops=1)

2.          

Initplan (for Limit)

3. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalue_valuecode_idx on parametervalue (cost=0.28..8.29 rows=1 width=4) (never executed)

  • Index Cond: ((valuecode)::text = 'NL.excludedFromConventionalMeteringRequest'::text)
  • Filter: ((parametercategorycode)::text = 'contractUserItemCode'::text)
4. 0.002 0.140 ↑ 4.0 1 1

Nested Loop (cost=8.30..38,085.46 rows=4 width=0) (actual time=0.140..0.140 rows=1 loops=1)

  • Join Filter: (cw_4.crmworkflowstatusparamid = pv_s_4.parametervalueid)
5. 0.021 0.021 ↑ 3.0 1 1

Seq Scan on parametervalue pv_s_4 (cost=0.00..46.95 rows=3 width=4) (actual time=0.021..0.021 rows=1 loops=1)

  • Filter: ((internalparametervaluecode)::text = ANY ('{RUNNING,SUCCESS}'::text[]))
  • Rows Removed by Filter: 7
6. 0.001 0.117 ↑ 1,265.0 1 1

Materialize (cost=8.30..37,984.75 rows=1,265 width=4) (actual time=0.117..0.117 rows=1 loops=1)

7. 0.019 0.116 ↑ 1,265.0 1 1

Hash Join (cost=8.30..37,978.43 rows=1,265 width=4) (actual time=0.116..0.116 rows=1 loops=1)

  • Hash Cond: (cw_4.crmworkflowtypeparamid = pv_t_4.parametervalueid)
8. 0.053 0.053 ↑ 13,904.7 87 1

Seq Scan on crmworkflow cw_4 (cost=0.00..33,421.07 rows=1,209,707 width=8) (actual time=0.012..0.053 rows=87 loops=1)

9. 0.001 0.044 ↑ 1.0 1 1

Hash (cost=8.29..8.29 rows=1 width=4) (actual time=0.044..0.044 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
10. 0.043 0.043 ↑ 1.0 1 1

Index Scan using parametervalue_valuecode_idx on parametervalue pv_t_4 (cost=0.28..8.29 rows=1 width=4) (actual time=0.042..0.043 rows=1 loops=1)

  • Index Cond: ((valuecode)::text = 'NL_indexCollectionKV'::text)
11. 0.142 0.142 ↓ 0.0 0 1

Result (cost=78,103.78..9,752,405.06 rows=177 width=82) (actual time=0.142..0.142 rows=0 loops=1)

  • One-Time Filter: (NOT $26)
12. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=78,103.78..9,357,361.14 rows=177 width=82) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=77,606.59..1,464,807.67 rows=7,934 width=82) (never executed)

  • Hash Cond: ((SubPlan 5) = m.meterid)
14. 0.000 0.000 ↓ 0.0 0

Nested Loop Anti Join (cost=52,985.10..362,713.65 rows=25,474 width=58) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=52,984.67..298,108.22 rows=45,953 width=58) (never executed)

  • Join Filter: ((physicalconfig.fromdate <= (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text))) AND ((physicalconfig.todate IS NULL) OR (physicalconfig.todate > (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))))
16. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=52,984.25..268,457.56 rows=45,953 width=54) (never executed)

  • Join Filter: ((generalconfig.fromdate <= (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text))) AND ((generalconfig.todate IS NULL) OR (generalconfig.todate > (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))) AND (generalconfig.deliverypointid = deliverypoint.deliverypointid))
  • Filter: (((generalconfig.category IS NULL) OR ((generalconfig.category)::text = 'SMALL_CAPACITY'::text)) AND ((generalconfig.readingfrequency IS NULL) OR ((generalconfig.readingfrequency)::text <> 'NOT_MEASURED'::text)) AND ((generalconfig.state IS NULL) OR ((generalconfig.state)::text = 'IN_USE'::text)))
17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=52,983.83..199,544.42 rows=62,577 width=54) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=52,983.41..166,677.61 rows=62,577 width=54) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=52,982.99..132,473.57 rows=62,577 width=35) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Merge Join (cost=52,982.57..97,671.42 rows=62,577 width=31) (never executed)

  • Merge Cond: (co_1.contractid = co.contractid)
21. 0.000 0.000 ↓ 0.0 0

Merge Join (cost=52,982.15..80,771.30 rows=63,960 width=20) (never executed)

  • Merge Cond: (cdp.contractid = co_1.contractid)
  • Join Filter: ((cdp.fromdate <= (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text))) AND ((cdp.todate IS NULL) OR (cdp.todate > (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))) AND (cdp.fromdate <> (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text))) AND ((cdp.todate IS NULL) OR (cdp.todate <> (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))))
22. 0.000 0.000 ↓ 0.0 0

Index Scan using contractdelively_contract_id_idx on contractdelivery cdp (cost=0.42..14,277.26 rows=153,030 width=20) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Materialize (cost=52,981.73..59,080.89 rows=304,958 width=8) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Unique (cost=52,981.73..55,268.91 rows=304,958 width=8) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Sort (cost=52,981.73..53,744.12 rows=304,958 width=8) (never executed)

  • Sort Key: co_1.contractid, (to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text))
26. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..21,030.72 rows=304,958 width=8) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Seq Scan on contract co_1 (cost=0.00..8,990.57 rows=152,479 width=8) (never executed)

  • Filter: (supplierindexcollectiondate IS NOT NULL)
28. 0.000 0.000 ↓ 0.0 0

Seq Scan on contract co_2 (cost=0.00..8,990.57 rows=152,479 width=8) (never executed)

  • Filter: (supplierindexcollectiondate IS NOT NULL)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using contract_pkey on contract co (cost=0.42..15,718.07 rows=153,020 width=19) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Index Scan using deliveryperiod_pkey on deliveryperiod (cost=0.42..0.55 rows=1 width=12) (never executed)

  • Index Cond: (deliveryperiodid = cdp.deliveryperiodid)
  • Filter: (deleted IS FALSE)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using deliverypoint_pkey on deliverypoint (cost=0.42..0.54 rows=1 width=23) (never executed)

  • Index Cond: (deliverypointid = deliveryperiod.deliverypointid)
  • Filter: (deleted IS FALSE)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using deliverypointcomponent_pk on deliverypointcomponent (cost=0.42..0.52 rows=1 width=4) (never executed)

  • Index Cond: (deliverypointcomponentid = deliveryperiod.deliverypointcomponentid)
  • Filter: (deleted IS FALSE)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using generalconfig_deliverypointcomponentid_idx on generalconfig (cost=0.42..1.05 rows=2 width=42) (never executed)

  • Index Cond: (deliverypointcomponentid = deliverypointcomponent.deliverypointcomponentid)
  • Filter: ((deleted IS FALSE) AND ((sourceid)::text = 'DGO'::text))
34. 0.000 0.000 ↓ 0.0 0

Index Scan using physicalconfigid on physicalconfig (cost=0.42..0.63 rows=1 width=20) (never executed)

  • Index Cond: ((deliverypointid = deliverypoint.deliverypointid) AND (deliverypointcomponentid = deliverypointcomponent.deliverypointcomponentid))
  • Filter: ((deleted IS FALSE) AND ((sourceid)::text = 'DGO'::text))
35. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_contractuserfields_contractid_pk on contractuserfields cuf (cost=0.43..1.40 rows=1 width=4) (never executed)

  • Index Cond: (contractid = co.contractid)
  • Filter: (useritemcodeparamid = $21)
36. 0.000 0.000 ↓ 0.0 0

Hash (cost=23,193.56..23,193.56 rows=73,834 width=32) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=9,552.00..23,193.56 rows=73,834 width=32) (never executed)

  • Hash Cond: (physicalconfig_1.physicalconfigid = m.physicalconfigid)
38. 0.000 0.000 ↓ 0.0 0

Seq Scan on physicalconfig physicalconfig_1 (cost=0.00..8,031.65 rows=259,265 width=4) (never executed)

  • Filter: (deleted IS FALSE)
39. 0.000 0.000 ↓ 0.0 0

Hash (cost=8,052.08..8,052.08 rows=73,834 width=36) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Seq Scan on meter m (cost=0.00..8,052.08 rows=73,834 width=36) (never executed)

  • Filter: (((metertype)::text = 'SMART_METER'::text) AND ((smartmeterstatus)::text = 'ACTIVE_READABLE'::text))
41.          

SubPlan (for Hash Join)

42. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.89..16.90 rows=1 width=4) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.84..16.89 rows=1 width=4) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Index Scan using meter_physicalconfigid_idx on meter m_1 (cost=0.42..8.44 rows=1 width=8) (never executed)

  • Index Cond: (physicalconfigid = physicalconfig.physicalconfigid)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using physicalconfig_pk on physicalconfig physicalconfig_2 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: (physicalconfigid = physicalconfig.physicalconfigid)
  • Filter: (deleted IS FALSE)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_pkey on crmworkflow cw3 (cost=497.19..994.77 rows=1 width=4) (never executed)

  • Index Cond: (crmworkflowid = (SubPlan 7))
  • Filter: ((creationdate >= '2019-12-30'::date) AND (creationdate < '2020-01-13'::date))
47.          

SubPlan (for Index Scan)

48. 0.000 0.000 ↓ 0.0 0

Limit (cost=496.76..496.76 rows=1 width=12) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Sort (cost=496.76..496.76 rows=1 width=12) (never executed)

  • Sort Key: cw_3.creationdate
50. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.67..496.75 rows=1 width=12) (never executed)

51. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.40..496.44 rows=1 width=16) (never executed)

  • Join Filter: (cw_3.crmworkflowtypeparamid = pv_t_3.parametervalueid)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalue_valuecode_idx on parametervalue pv_t_3 (cost=0.28..8.29 rows=1 width=4) (never executed)

  • Index Cond: ((valuecode)::text = 'NL_indexCollectionKV'::text)
53. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.12..487.66 rows=39 width=20) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflowdata_key_value_idx on crmworkflowdata cwd_3 (cost=0.69..157.82 rows=39 width=4) (never executed)

  • Index Cond: (((key)::text = 'BUSINESS_KEY'::text) AND (value = (((deliverypoint.gsrn)::text || '_'::text) || to_char(((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))::timestamp with time zone, 'YYYYMMDD'::text))))
55. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_pkey on crmworkflow cw_3 (cost=0.43..8.45 rows=1 width=20) (never executed)

  • Index Cond: (crmworkflowid = cwd_3.crmworkflowid)
56. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_s_3 (cost=0.28..0.30 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw_3.crmworkflowstatusparamid)
  • Filter: ((internalparametervaluecode)::text = 'ERROR'::text)
57. 0.000 0.000 ↓ 0.0 0

Limit (cost=496.76..496.76 rows=1 width=12) (never executed)

58. 0.000 0.000 ↓ 0.0 0

Sort (cost=496.76..496.76 rows=1 width=12) (never executed)

  • Sort Key: cw_3.creationdate
59. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.67..496.75 rows=1 width=12) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.40..496.44 rows=1 width=16) (never executed)

  • Join Filter: (cw_3.crmworkflowtypeparamid = pv_t_3.parametervalueid)
61. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalue_valuecode_idx on parametervalue pv_t_3 (cost=0.28..8.29 rows=1 width=4) (never executed)

  • Index Cond: ((valuecode)::text = 'NL_indexCollectionKV'::text)
62. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.12..487.66 rows=39 width=20) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflowdata_key_value_idx on crmworkflowdata cwd_3 (cost=0.69..157.82 rows=39 width=4) (never executed)

  • Index Cond: (((key)::text = 'BUSINESS_KEY'::text) AND (value = (((deliverypoint.gsrn)::text || '_'::text) || to_char(((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))::timestamp with time zone, 'YYYYMMDD'::text))))
64. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_pkey on crmworkflow cw_3 (cost=0.43..8.45 rows=1 width=20) (never executed)

  • Index Cond: (crmworkflowid = cwd_3.crmworkflowid)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_s_3 (cost=0.28..0.30 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw_3.crmworkflowstatusparamid)
  • Filter: ((internalparametervaluecode)::text = 'ERROR'::text)
66.          

SubPlan (for Result)

67. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=496.75..496.76 rows=1 width=0) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.67..496.75 rows=1 width=0) (never executed)

69. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.40..496.44 rows=1 width=4) (never executed)

  • Join Filter: (cw.crmworkflowtypeparamid = pv_t.parametervalueid)
70. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalue_valuecode_idx on parametervalue pv_t (cost=0.28..8.29 rows=1 width=4) (never executed)

  • Index Cond: ((valuecode)::text = 'NL_indexCollectionKV'::text)
71. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.12..487.66 rows=39 width=8) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflowdata_key_value_idx on crmworkflowdata cwd (cost=0.69..157.82 rows=39 width=4) (never executed)

  • Index Cond: (((key)::text = 'BUSINESS_KEY'::text) AND (value = (((deliverypoint.gsrn)::text || '_'::text) || to_char(((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))::timestamp with time zone, 'YYYYMMDD'::text))))
73. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_pkey on crmworkflow cw (cost=0.43..8.45 rows=1 width=12) (never executed)

  • Index Cond: (crmworkflowid = cwd.crmworkflowid)
74. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_s (cost=0.28..0.30 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw.crmworkflowstatusparamid)
  • Filter: ((internalparametervaluecode)::text = 'ERROR'::text)
75. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.69..1,213.06 rows=1 width=4) (never executed)

76. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=9.69..1,213.06 rows=1 width=4) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=9.01..1,205.28 rows=1 width=4) (never executed)

78. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=8.74..1,203.28 rows=6 width=8) (never executed)

  • Hash Cond: (cw_1.crmworkflowstatusparamid = pv_s_1.parametervalueid)
79. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_effectivedate_idx on crmworkflow cw_1 (cost=0.43..1,172.23 rows=6,049 width=12) (never executed)

  • Index Cond: ((effectivedate >= ((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)) - 5)) AND (effectivedate <= ((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)) + 5)))
80. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.29..8.29 rows=1 width=4) (never executed)

81. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalue_internalparametervaluecode_idx on parametervalue pv_s_1 (cost=0.28..8.29 rows=1 width=4) (never executed)

  • Index Cond: ((internalparametervaluecode)::text = 'RUNNING'::text)
82. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_t_1 (cost=0.28..0.32 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw_1.crmworkflowtypeparamid)
  • Filter: ((valuecode)::text = ANY ('{NL_indexCollectionKV,NL_VKOindex}'::text[]))
83. 0.000 0.000 ↓ 0.0 0

Index Only Scan using crmworkflowdata_crmworkflowid_key_value_idx on crmworkflowdata cwd_1 (cost=0.68..7.77 rows=1 width=4) (never executed)

  • Index Cond: ((crmworkflowid = cw_1.crmworkflowid) AND (key = 'BUSINESS_KEY'::text))
  • Filter: (value ~~ ((deliverypoint.gsrn)::text || '_%'::text))
  • Heap Fetches: 0
84. 0.000 0.000 ↓ 0.0 0

Limit (cost=27.36..66.48 rows=1 width=4) (never executed)

85. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=27.36..66.48 rows=1 width=4) (never executed)

86. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=26.93..30.99 rows=1 width=4) (never executed)

  • Filter: ((((index.sourceid)::text = 'USER'::text) AND ((i2.marketstatus)::text = ANY ('{SUBMITTED,ACCEPTED}'::text[]))) OR ((index.sourceid)::text <> 'USER'::text))
87. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on index (cost=10.01..14.04 rows=1 width=11) (never executed)

  • Recheck Cond: ((deliverypointcomponentid = deliverypointcomponent.deliverypointcomponentid) AND (deliverypointid = deliverypoint.deliverypointid))
  • Filter: ((deleted IS FALSE) AND ((status)::text = 'ACTUAL'::text) AND (todate >= ((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)) - 5)) AND (todate <= ((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)) + 5)))
88. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=10.01..10.01 rows=1 width=0) (never executed)

89. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on index_dpcomp_idx (cost=0.00..4.88 rows=60 width=0) (never executed)

  • Index Cond: (deliverypointcomponentid = deliverypointcomponent.deliverypointcomponentid)
90. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on index_deliverypointid_idx (cost=0.00..4.88 rows=60 width=0) (never executed)

  • Index Cond: (deliverypointid = deliverypoint.deliverypointid)
91. 0.000 0.000 ↓ 0.0 0

Limit (cost=16.92..16.92 rows=1 width=156) (never executed)

92. 0.000 0.000 ↓ 0.0 0

Sort (cost=16.92..16.92 rows=1 width=156) (never executed)

  • Sort Key: (CASE WHEN ((i2.marketstatus)::text = 'ACCEPTED'::text) THEN 1 WHEN ((i2.marketstatus)::text = 'SUMBITTED'::text) THEN 2 WHEN ((i2.marketstatus)::text = 'REJECTED'::text) THEN 3 ELSE NULL::integer END)
93. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..16.91 rows=1 width=156) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Index Only Scan using indexrelation_pk on indexrelation ir (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: (sourceindexid = index.indexid)
  • Heap Fetches: 0
95. 0.000 0.000 ↓ 0.0 0

Index Scan using index_pk on index i2 (cost=0.43..8.45 rows=1 width=156) (never executed)

  • Index Cond: (indexid = ir.targetindexid)
  • Filter: ((sourceid)::text = 'SUPPLIER'::text)
96. 0.000 0.000 ↓ 0.0 0

Index Scan using consumption_indexid_idx on consumption (cost=0.43..35.25 rows=25 width=4) (never executed)

  • Index Cond: (endindexid = index.indexid)
  • Filter: ((deleted IS FALSE) AND ((sourceid)::text = 'DGO'::text))
97. 0.000 0.000 ↓ 0.0 0

Limit (cost=455.57..455.57 rows=1 width=41) (never executed)

98. 0.000 0.000 ↓ 0.0 0

Sort (cost=455.57..455.57 rows=1 width=41) (never executed)

  • Sort Key: cw_2.crmworkflowid
99. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=2.35..455.56 rows=1 width=41) (never executed)

100. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=2.08..455.25 rows=1 width=45) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.80..450.33 rows=16 width=49) (never executed)

  • Join Filter: (cwd_2.crmworkflowid = cw_2.crmworkflowid)
102. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.38..433.70 rows=16 width=45) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflowdata_key_value_idx on crmworkflowdata cwd_2 (cost=0.69..157.82 rows=39 width=4) (never executed)

  • Index Cond: (((key)::text = 'BUSINESS_KEY'::text) AND (value = (((deliverypoint.gsrn)::text || '_'::text) || to_char(((to_date(((('2019-'::text || (date_part('month'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text) || '-'::text) || (date_part('day'::text, (co_1.supplierindexcollectiondate)::timestamp without time zone))::text), 'YYYY-MM-DD'::text)))::timestamp with time zone, 'YYYYMMDD'::text))))
104. 0.000 0.000 ↓ 0.0 0

Index Only Scan using crmworkflowdata_crmworkflowid_key_value_idx on crmworkflowdata cwd_err (cost=0.68..7.06 rows=1 width=41) (never executed)

  • Index Cond: ((crmworkflowid = cwd_2.crmworkflowid) AND (key = 'ERROR_REASON'::text))
  • Heap Fetches: 0
105. 0.000 0.000 ↓ 0.0 0

Index Scan using crmworkflow_pkey on crmworkflow cw_2 (cost=0.43..1.03 rows=1 width=12) (never executed)

  • Index Cond: (crmworkflowid = cwd_err.crmworkflowid)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_t_2 (cost=0.28..0.30 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw_2.crmworkflowtypeparamid)
  • Filter: ((valuecode)::text = 'NL_indexCollectionKV'::text)
107. 0.000 0.000 ↓ 0.0 0

Index Scan using parametervalueid on parametervalue pv_s_2 (cost=0.28..0.30 rows=1 width=4) (never executed)

  • Index Cond: (parametervalueid = cw_2.crmworkflowstatusparamid)
  • Filter: ((internalparametervaluecode)::text = 'ERROR'::text)
Planning time : 19.845 ms
Execution time : 0.652 ms