explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tesk

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 3,079.679 ↑ 30.5 2 1

Sort (cost=14,998.24..14,998.39 rows=61 width=667) (actual time=3,079.679..3,079.679 rows=2 loops=1)

  • Sort Key: cu.customernbr, c.consumptionid
  • Sort Method: quicksort Memory: 26kB
2.          

CTE consofull

3. 0.001 3,077.559 ↑ 500.0 2 1

Limit (cost=0.86..8,343.03 rows=1,000 width=20) (actual time=2,482.451..3,077.559 rows=2 loops=1)

4. 0.728 3,077.558 ↑ 188,696.5 2 1

Nested Loop (cost=0.86..3,144,503.20 rows=377,393 width=20) (actual time=2,482.450..3,077.558 rows=2 loops=1)

5. 1,275.903 3,076.748 ↑ 136,989.5 2 1

Index Scan using consumption_deliverypointid_status_historical_release_fromd_idx on consumption c_1 (cost=0.43..2,046,849.63 rows=273,979 width=12) (actual time=2,481.915..3,076.748 rows=2 loops=1)

  • Index Cond: (((status)::text = 'ACTUAL'::text) AND (fromdate <= '2016-02-01'::date))
  • Filter: ((deleted IS FALSE) AND ((sourceid)::text <> 'AMR_AGGREGATION'::text) AND ((todate IS NULL) OR (todate > '2015-11-22'::date)) AND (((sourceid)::text <> 'USER'::text) OR ((measurementfrequency)::text <> 'QUARTER_HOURLY'::text)) AND (((sourceid)::text <> 'USER'::text) OR ((measurementfrequency)::text <> 'TEN_MIN'::text)) AND (((sourceid)::text <> 'USER'::text) OR ((measurementfrequency)::text <> 'HALF_HOURLY'::text)) AND (((sourceid)::text <> 'DGO'::text) OR ((measurementfrequency)::text <> 'QUARTER_HOURLY'::text)) AND (((sourceid)::text <> 'DGO'::text) OR ((measurementfrequency)::text <> 'TEN_MIN'::text)) AND (((sourceid)::text <> 'DGO'::text) OR ((measurementfrequency)::text <> 'HALF_HOURLY'::text)) AND (SubPlan 1))
  • Rows Removed by Filter: 644,296
6.          

SubPlan (for Index Scan)

7. 0.000 1,800.845 ↓ 2.0 2 360,169

Nested Loop (cost=0.85..4.91 rows=1 width=4) (actual time=0.004..0.005 rows=2 loops=360,169)

8. 720.338 720.338 ↑ 1.0 1 360,169

Index Scan using idx_contract_supplierref on contract co_1 (cost=0.42..2.45 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=360,169)

  • Index Cond: ((supplierref)::text = '00018448'::text)
  • Filter: ((supplierref)::text ~~ '00018448'::text)
9. 1,080.507 1,080.507 ↓ 2.0 2 360,169

Index Scan using contractdelively_contract_id_idx on contractdelivery (cost=0.42..2.46 rows=1 width=8) (actual time=0.002..0.003 rows=2 loops=360,169)

  • Index Cond: (contractid = co_1.contractid)
  • Filter: (((c_1.externalref IS NULL) AND (fromdate < c_1.todate) AND ((todate IS NULL) OR (todate > c_1.fromdate))) OR ((c_1.externalref IS NOT NULL) AND ((c_1.externalref)::text = ((contractid)::character varying)::text)))
  • Rows Removed by Filter: 3
10. 0.082 0.082 ↑ 11.0 1 2

Index Scan using "IX_consumptiondetail_consumptionid_consumptiondetail" on consumptiondetail consumptiondetail_1 (cost=0.43..3.20 rows=11 width=8) (actual time=0.040..0.041 rows=1 loops=2)

  • Index Cond: (consumptionid = c_1.consumptionid)
  • Filter: ((ignored IS FALSE) AND ((direction)::text = 'CONSUMPTION'::text) AND ((measurementnature)::text <> ALL ('{REACTIVE_CAPACITIVE_ENERGY,REACTIVE_CAPACITIVE_POWER,REACTIVE_INDUCTIVE_ENERGY,REACTIVE_INDUCTIVE_POWER}'::text[])))
11.          

Initplan (for Sort)

12. 0.043 0.043 ↑ 1.0 1 1

Index Scan using property_pkey on property (cost=0.27..2.29 rows=1 width=7) (actual time=0.043..0.043 rows=1 loops=1)

  • Index Cond: ((propertycode)::text = 'defaultCountryCode'::text)
13. 0.060 3,079.650 ↑ 30.5 2 1

Hash Left Join (cost=92.75..6,651.11 rows=61 width=667) (actual time=2,484.185..3,079.650 rows=2 loops=1)

  • Hash Cond: (actor_dgo.actorid = dgo_actor.actorid)
14. 0.008 3,079.211 ↑ 30.5 2 1

Nested Loop Left Join (cost=85.09..5,949.62 rows=61 width=578) (actual time=2,483.823..3,079.211 rows=2 loops=1)

15. 0.090 3,078.647 ↑ 30.5 2 1

Nested Loop Left Join (cost=74.72..3,221.37 rows=61 width=578) (actual time=2,483.413..3,078.647 rows=2 loops=1)

16. 0.008 3,078.537 ↑ 30.5 2 1

Nested Loop Left Join (cost=72.42..3,002.48 rows=61 width=578) (actual time=2,483.319..3,078.537 rows=2 loops=1)

17. 0.009 3,078.483 ↑ 30.5 2 1

Nested Loop Left Join (cost=71.99..2,859.44 rows=61 width=554) (actual time=2,483.272..3,078.483 rows=2 loops=1)

18. 0.007 3,078.418 ↑ 30.5 2 1

Nested Loop Left Join (cost=71.57..2,755.00 rows=61 width=554) (actual time=2,483.215..3,078.418 rows=2 loops=1)

19. 0.008 3,078.347 ↑ 30.5 2 1

Nested Loop Left Join (cost=71.15..2,650.56 rows=61 width=541) (actual time=2,483.153..3,078.347 rows=2 loops=1)

20. 0.017 3,078.291 ↑ 30.5 2 1

Nested Loop Left Join (cost=70.72..2,545.74 rows=61 width=516) (actual time=2,483.105..3,078.291 rows=2 loops=1)

  • Join Filter: (((cdp.todate IS NULL) OR (c.fromdate < cdp.todate)) AND (c.todate > cdp.fromdate) AND ((c.externalref IS NULL) OR ((c.externalref)::integer = cdp.contractid)))
  • Rows Removed by Join Filter: 8
21. 0.009 3,078.206 ↑ 30.5 2 1

Nested Loop Left Join (cost=70.30..2,439.55 rows=61 width=522) (actual time=2,483.036..3,078.206 rows=2 loops=1)

  • Join Filter: (deliverypointcomponent.deliverypointcomponentid = deliveryperiod.deliverypointcomponentid)
22. 0.017 3,078.137 ↑ 30.5 2 1

Hash Left Join (cost=69.87..2,334.25 rows=61 width=526) (actual time=2,482.974..3,078.137 rows=2 loops=1)

  • Hash Cond: ((deliverypointcomponent.componentnature)::text = (componentnature.componentnature)::text)
23. 0.007 3,077.943 ↑ 30.5 2 1

Nested Loop Left Join (cost=32.15..2,295.68 rows=61 width=502) (actual time=2,482.783..3,077.943 rows=2 loops=1)

24. 0.007 3,077.878 ↑ 30.5 2 1

Nested Loop Left Join (cost=31.73..2,191.15 rows=61 width=494) (actual time=2,482.726..3,077.878 rows=2 loops=1)

25. 0.007 3,077.809 ↑ 30.5 2 1

Nested Loop Left Join (cost=31.30..2,086.62 rows=61 width=472) (actual time=2,482.664..3,077.809 rows=2 loops=1)

26. 0.024 3,077.740 ↑ 30.5 2 1

Hash Join (cost=30.87..1,979.20 rows=61 width=468) (actual time=2,482.604..3,077.740 rows=2 loops=1)

  • Hash Cond: ((consumptiondetail.measurementnature)::text = (measurementnature.nature)::text)
27. 0.007 3,077.683 ↑ 30.5 2 1

Nested Loop Left Join (cost=1.29..1,949.46 rows=61 width=436) (actual time=2,482.551..3,077.683 rows=2 loops=1)

28. 0.008 3,077.658 ↑ 30.5 2 1

Nested Loop (cost=0.86..1,843.25 rows=61 width=408) (actual time=2,482.529..3,077.658 rows=2 loops=1)

  • Join Filter: (consofull.consumptionid = c.consumptionid)
29. 0.007 3,077.612 ↑ 30.5 2 1

Nested Loop (cost=0.43..1,737.32 rows=61 width=333) (actual time=2,482.493..3,077.612 rows=2 loops=1)

30. 3,077.565 3,077.565 ↑ 500.0 2 1

CTE Scan on consofull (cost=0.00..20.00 rows=1,000 width=16) (actual time=2,482.454..3,077.565 rows=2 loops=1)

31. 0.040 0.040 ↑ 2.0 1 2

Index Scan using consumptiondetail_pkey on consumptiondetail (cost=0.43..3.00 rows=2 width=325) (actual time=0.020..0.020 rows=1 loops=2)

  • Index Cond: ((consumptionid = consofull.consumptionid) AND (consumptiondetailnbr = consofull.consumptiondetailnbr))
  • Filter: (ignored IS FALSE)
32. 0.038 0.038 ↑ 1.0 1 2

Index Scan using consumption_pkey on consumption c (cost=0.43..1.72 rows=1 width=83) (actual time=0.019..0.019 rows=1 loops=2)

  • Index Cond: (consumptionid = consumptiondetail.consumptionid)
33. 0.018 0.018 ↓ 0.0 0 2

Index Scan using logicalregister_pk on logicalregister (cost=0.43..1.72 rows=1 width=36) (actual time=0.009..0.009 rows=0 loops=2)

  • Index Cond: (logicalregisterid = consumptiondetail.logicalregisterid)
  • Filter: (ignored IS FALSE)
34. 0.010 0.033 ↑ 29.0 30 1

Hash (cost=18.70..18.70 rows=870 width=64) (actual time=0.033..0.033 rows=30 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
35. 0.023 0.023 ↑ 29.0 30 1

Seq Scan on measurementnature (cost=0.00..18.70 rows=870 width=64) (actual time=0.020..0.023 rows=30 loops=1)

36. 0.062 0.062 ↑ 1.0 1 2

Index Scan using message_pk on message (cost=0.43..1.76 rows=1 width=12) (actual time=0.031..0.031 rows=1 loops=2)

  • Index Cond: (messageid = c.messageid)
37. 0.062 0.062 ↑ 1.0 1 2

Index Scan using deliverypoint_pkey on deliverypoint (cost=0.42..1.71 rows=1 width=26) (actual time=0.031..0.031 rows=1 loops=2)

  • Index Cond: (deliverypointid = c.deliverypointid)
  • Filter: (deleted IS FALSE)
38. 0.058 0.058 ↑ 1.0 1 2

Index Scan using deliverypointcomponent_pk on deliverypointcomponent (cost=0.42..1.71 rows=1 width=12) (actual time=0.029..0.029 rows=1 loops=2)

  • Index Cond: (deliverypointcomponentid = c.deliverypointcomponentid)
  • Filter: (deleted IS FALSE)
39. 0.003 0.177 ↑ 59.1 11 1

Hash (cost=29.60..29.60 rows=650 width=64) (actual time=0.177..0.177 rows=11 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
40. 0.009 0.174 ↑ 59.1 11 1

Hash Left Join (cost=8.93..29.60 rows=650 width=64) (actual time=0.168..0.174 rows=11 loops=1)

  • Hash Cond: ((componentnature.componentnature)::text = (codetranslation_1.code)::text)
41. 0.009 0.061 ↑ 59.1 11 1

Hash Left Join (cost=2.47..21.42 rows=650 width=49) (actual time=0.058..0.061 rows=11 loops=1)

  • Hash Cond: ((componentnature.componentnature)::text = (codetranslation.code)::text)
42. 0.018 0.018 ↑ 59.1 11 1

Seq Scan on componentnature (cost=0.00..16.50 rows=650 width=32) (actual time=0.017..0.018 rows=11 loops=1)

43. 0.001 0.034 ↓ 0.0 0 1

Hash (cost=2.46..2.46 rows=1 width=28) (actual time=0.034..0.034 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
44. 0.033 0.033 ↓ 0.0 0 1

Index Scan using codetranslation_category_code_countrycode_idx on codetranslation (cost=0.28..2.46 rows=1 width=28) (actual time=0.033..0.033 rows=0 loops=1)

  • Index Cond: (((category)::text = 'componentnature'::text) AND (countrycode IS NULL))
45. 0.003 0.104 ↓ 2.2 11 1

Hash (cost=6.40..6.40 rows=5 width=28) (actual time=0.104..0.104 rows=11 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
46. 0.101 0.101 ↓ 2.2 11 1

Index Scan using codetranslation_category_code_countrycode_idx on codetranslation codetranslation_1 (cost=0.28..6.40 rows=5 width=28) (actual time=0.083..0.101 rows=11 loops=1)

  • Index Cond: (((category)::text = 'componentnature'::text) AND ((countrycode)::text = ($15)::text))
47. 0.060 0.060 ↑ 1.0 1 2

Index Scan using deliveryperiod_pkey on deliveryperiod (cost=0.42..1.71 rows=1 width=8) (actual time=0.030..0.030 rows=1 loops=2)

  • Index Cond: (deliveryperiodid = c.deliveryperiodid)
  • Filter: (deleted IS FALSE)
48. 0.068 0.068 ↓ 5.0 5 2

Index Scan using contractdelivery_deliveryperiodid_idx on contractdelivery cdp (cost=0.42..1.72 rows=1 width=16) (actual time=0.025..0.034 rows=5 loops=2)

  • Index Cond: (deliveryperiodid = deliveryperiod.deliveryperiodid)
49. 0.048 0.048 ↑ 1.0 1 2

Index Scan using contract_pkey on contract co (cost=0.42..1.72 rows=1 width=29) (actual time=0.024..0.024 rows=1 loops=2)

  • Index Cond: (contractid = cdp.contractid)
50. 0.064 0.064 ↑ 1.0 1 2

Index Scan using customer_pkey on customer cu (cost=0.42..1.71 rows=1 width=17) (actual time=0.032..0.032 rows=1 loops=2)

  • Index Cond: (customerid = co.customerid)
51. 0.056 0.056 ↑ 1.0 1 2

Index Scan using idx_crmdata_customerid_pk on crmdata crm (cost=0.42..1.71 rows=1 width=8) (actual time=0.028..0.028 rows=1 loops=2)

  • Index Cond: (customerid = cu.customerid)
52. 0.046 0.046 ↑ 1.0 1 2

Index Scan using generalconfig_pkey on generalconfig (cost=0.43..2.34 rows=1 width=32) (actual time=0.023..0.023 rows=1 loops=2)

  • Index Cond: (generalconfigid = consofull.generalconfigid)
  • Filter: (deleted IS FALSE)
53. 0.000 0.020 ↑ 1.0 1 2

Index Scan using "Key4" on contracthistory ch (cost=2.29..3.59 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=2)

  • Index Cond: ((contractid = co.contractid) AND (contracthistentry = (SubPlan 10)))
54.          

SubPlan (for Index Scan)

55. 0.000 0.068 ↑ 1.0 1 2

Limit (cost=1.86..1.87 rows=1 width=4) (actual time=0.034..0.034 rows=1 loops=2)

56.          

Initplan (for Limit)

57. 0.002 0.064 ↑ 1.0 1 2

Limit (cost=0.43..1.86 rows=1 width=4) (actual time=0.032..0.032 rows=1 loops=2)

58. 0.062 0.062 ↑ 2.0 1 2

Index Only Scan Backward using "Key4" on contracthistory ch2 (cost=0.43..3.29 rows=2 width=4) (actual time=0.031..0.031 rows=1 loops=2)

  • Index Cond: ((contractid = co.contractid) AND (contracthistentry IS NOT NULL))
  • Heap Fetches: 2
59. 0.068 0.068 ↑ 1.0 1 2

Result (cost=1.86..1.87 rows=1 width=4) (actual time=0.034..0.034 rows=1 loops=2)

60. 0.006 0.556 ↑ 1.0 1 2

Nested Loop Left Join (cost=10.37..44.72 rows=1 width=12) (actual time=0.238..0.278 rows=1 loops=2)

  • Join Filter: (((actor_brp.externalid)::text = (deliveryperiodbrpjournal.brp)::text) AND ((actor_brp.marketcode)::text = (dp.market)::text))
  • Rows Removed by Join Filter: 2
61. 0.008 0.532 ↑ 1.0 1 2

Nested Loop Left Join (cost=10.37..37.75 rows=1 width=19) (actual time=0.233..0.266 rows=1 loops=2)

  • Join Filter: (((actor_sup.externalid)::text = (deliveryperiod_1.supplier)::text) AND ((actor_sup.marketcode)::text = (dp.market)::text))
  • Rows Removed by Join Filter: 1
62. 0.004 0.508 ↑ 1.0 1 2

Nested Loop Left Join (cost=10.37..30.79 rows=1 width=26) (actual time=0.229..0.254 rows=1 loops=2)

63. 0.090 0.316 ↑ 1.0 1 2

Nested Loop Left Join (cost=4.61..22.44 rows=1 width=22) (actual time=0.133..0.158 rows=1 loops=2)

64. 0.012 0.208 ↑ 1.0 1 2

Nested Loop Left Join (cost=1.73..18.27 rows=1 width=11) (actual time=0.079..0.104 rows=1 loops=2)

  • Join Filter: ((actor_reg.externalid)::text = (dp.regulator)::text)
  • Rows Removed by Join Filter: 2
65. 0.046 0.180 ↑ 1.0 1 2

Hash Right Join (cost=1.73..11.31 rows=1 width=16) (actual time=0.072..0.090 rows=1 loops=2)

  • Hash Cond: (((actor_dgo.marketcode)::text = (dp.market)::text) AND ((actor_dgo.externalid)::text = (dp.gridoperator)::text))
  • Join Filter: ((dp.regulator)::text = ((SubPlan 11))::text)
66. 0.062 0.062 ↑ 1.1 59 2

Seq Scan on actor actor_dgo (cost=0.00..6.92 rows=64 width=15) (actual time=0.009..0.031 rows=59 loops=2)

  • Filter: ((role)::text = ANY ('{D,T}'::text[]))
  • Rows Removed by Filter: 15
67. 0.006 0.026 ↑ 1.0 1 2

Hash (cost=1.72..1.72 rows=1 width=20) (actual time=0.013..0.013 rows=1 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
68. 0.020 0.020 ↑ 1.0 1 2

Index Scan using deliverypoint_pkey on deliverypoint dp (cost=0.42..1.72 rows=1 width=20) (actual time=0.010..0.010 rows=1 loops=2)

  • Index Cond: (deliverypointid = deliverypoint.deliverypointid)
  • Filter: (deleted IS FALSE)
69.          

SubPlan (for Hash Right Join)

70. 0.046 0.046 ↑ 1.0 1 2

Index Scan using gridoperator_pkey on gridoperator dgo (cost=0.14..2.16 rows=1 width=32) (actual time=0.023..0.023 rows=1 loops=2)

  • Index Cond: (gridoperatorid = actor_dgo.actorid)
71. 0.016 0.016 ↑ 1.0 3 2

Seq Scan on actor actor_reg (cost=0.00..6.92 rows=3 width=13) (actual time=0.002..0.008 rows=3 loops=2)

  • Filter: ((role)::text = 'RR'::text)
  • Rows Removed by Filter: 71
72. 0.000 0.018 ↑ 1.0 1 2

Index Scan using deliveryperiod_pkey on deliveryperiod deliveryperiod_1 (cost=2.88..4.17 rows=1 width=11) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (deliveryperiodid = (SubPlan 12))
  • Filter: (deleted IS FALSE)
73.          

SubPlan (for Index Scan)

74. 0.002 0.080 ↑ 1.0 1 2

Limit (cost=2.45..2.46 rows=1 width=8) (actual time=0.039..0.040 rows=1 loops=2)

75. 0.020 0.078 ↑ 1.0 1 2

Sort (cost=2.45..2.46 rows=1 width=8) (actual time=0.038..0.039 rows=1 loops=2)

  • Sort Key: deliveryperiod_3.todate DESC
  • Sort Method: quicksort Memory: 25kB
76. 0.058 0.058 ↓ 2.0 2 2

Index Scan using deliveryperiod_deliverypointid_supplier_sourceid_idx on deliveryperiod deliveryperiod_3 (cost=0.42..2.44 rows=1 width=8) (actual time=0.028..0.029 rows=2 loops=2)

  • Index Cond: (deliverypointid = dp.deliverypointid)
  • Filter: (deleted IS FALSE)
77. 0.122 0.188 ↑ 1.0 1 2

Nested Loop (cost=5.76..8.34 rows=1 width=12) (actual time=0.093..0.094 rows=1 loops=2)

78. 0.000 0.048 ↑ 1.0 1 2

Index Scan using deliveryperiodbrpjournal_pk on deliveryperiodbrpjournal (cost=5.33..6.62 rows=1 width=16) (actual time=0.024..0.024 rows=1 loops=2)

  • Index Cond: (deliveryperiodbrpjournalid = (SubPlan 13))
79.          

SubPlan (for Index Scan)

80. 0.002 0.110 ↑ 1.0 1 2

Limit (cost=4.90..4.91 rows=1 width=8) (actual time=0.055..0.055 rows=1 loops=2)

81. 0.024 0.108 ↑ 1.0 1 2

Sort (cost=4.90..4.91 rows=1 width=8) (actual time=0.054..0.054 rows=1 loops=2)

  • Sort Key: deliveryperiodbrpjournal_1.todate DESC
  • Sort Method: quicksort Memory: 25kB
82. 0.006 0.084 ↑ 1.0 1 2

Nested Loop (cost=0.85..4.89 rows=1 width=8) (actual time=0.041..0.042 rows=1 loops=2)

83. 0.062 0.062 ↑ 1.0 1 2

Index Scan using deliveryperiodbrpjournal_dperiod_brp_fromdate on deliveryperiodbrpjournal deliveryperiodbrpjournal_1 (cost=0.42..2.44 rows=1 width=12) (actual time=0.030..0.031 rows=1 loops=2)

  • Index Cond: (deliveryperiodid = deliveryperiod_1.deliveryperiodid)
84. 0.016 0.016 ↑ 1.0 1 2

Index Scan using deliveryperiod_pkey on deliveryperiod deliveryperiod_4 (cost=0.42..2.44 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=2)

  • Index Cond: (deliveryperiodid = deliveryperiod_1.deliveryperiodid)
  • Filter: (deleted IS FALSE)
85. 0.018 0.018 ↑ 1.0 1 2

Index Scan using deliveryperiod_pkey on deliveryperiod deliveryperiod_2 (cost=0.42..1.72 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (deliveryperiodid = deliveryperiodbrpjournal.deliveryperiodid)
  • Filter: (deleted IS FALSE)
86. 0.016 0.016 ↑ 1.0 2 2

Seq Scan on actor actor_sup (cost=0.00..6.92 rows=2 width=11) (actual time=0.002..0.008 rows=2 loops=2)

  • Filter: ((role)::text = 'S'::text)
  • Rows Removed by Filter: 72
87. 0.018 0.018 ↑ 1.0 3 2

Seq Scan on actor actor_brp (cost=0.00..6.92 rows=3 width=15) (actual time=0.002..0.009 rows=3 loops=2)

  • Filter: ((role)::text = 'B'::text)
  • Rows Removed by Filter: 71
88. 0.017 0.037 ↑ 1.0 74 1

Hash (cost=6.74..6.74 rows=74 width=20) (actual time=0.036..0.037 rows=74 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
89. 0.020 0.020 ↑ 1.0 74 1

Seq Scan on actor dgo_actor (cost=0.00..6.74 rows=74 width=20) (actual time=0.002..0.020 rows=74 loops=1)

90.          

SubPlan (for Hash Left Join)

91. 0.034 0.034 ↓ 0.0 0 2

Index Only Scan using decentralizedproduction_physicalconfig_idx on decentralizedproduction (cost=0.29..2.31 rows=1 width=0) (actual time=0.017..0.017 rows=0 loops=2)

  • Index Cond: (physicalconfigid = consofull.physicalconfigid)
  • Heap Fetches: 0
92. 0.000 0.000 ↓ 0.0 0

Seq Scan on decentralizedproduction decentralizedproduction_1 (cost=0.00..1,399.40 rows=57,140 width=4) (never executed)

93. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..4.14 rows=1 width=0) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Index Scan using "IX_meter_metertype_meter" on meter m (cost=0.43..1.69 rows=1 width=4) (never executed)

  • Index Cond: ((metertype)::text = 'SMART_METER'::text)
  • Filter: (physicalconfigid = consofull.physicalconfigid)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using physicalconfig_physicalconfigid_fromdate_todate_sourceid_idx on physicalconfig (cost=0.42..2.44 rows=1 width=4) (never executed)

  • Index Cond: (physicalconfigid = consofull.physicalconfigid)
  • Filter: (deleted IS FALSE)
96. 0.000 0.044 ↓ 0.0 0 1

Nested Loop (cost=0.85..4.13 rows=1 width=4) (actual time=0.044..0.044 rows=0 loops=1)

97. 0.044 0.044 ↓ 0.0 0 1

Index Scan using "IX_meter_metertype_meter" on meter m_1 (cost=0.43..1.68 rows=1 width=4) (actual time=0.044..0.044 rows=0 loops=1)

  • Index Cond: ((metertype)::text = 'SMART_METER'::text)
98. 0.000 0.000 ↓ 0.0 0

Index Scan using physicalconfig_physicalconfigid_fromdate_todate_sourceid_idx on physicalconfig physicalconfig_1 (cost=0.42..2.44 rows=1 width=4) (never executed)

  • Index Cond: (physicalconfigid = m_1.physicalconfigid)
  • Filter: (deleted IS FALSE)
99. 0.002 0.264 ↑ 1.0 1 2

Limit (cost=4.92..4.92 rows=1 width=32) (actual time=0.131..0.132 rows=1 loops=2)

100. 0.022 0.262 ↑ 1.0 1 2

Sort (cost=4.92..4.92 rows=1 width=32) (actual time=0.131..0.131 rows=1 loops=2)

  • Sort Key: (COALESCE(id.invdocref, (i.invoiceid)::character varying)) DESC
  • Sort Method: quicksort Memory: 25kB
101. 0.006 0.240 ↑ 1.0 1 2

Nested Loop Left Join (cost=1.30..4.91 rows=1 width=32) (actual time=0.119..0.120 rows=1 loops=2)

102. 0.004 0.148 ↑ 1.0 1 2

Nested Loop (cost=0.86..3.90 rows=1 width=4) (actual time=0.074..0.074 rows=1 loops=2)

103. 0.072 0.072 ↑ 1.0 1 2

Index Scan using idx_invoicedconsumption_consumptionid on invoicedconsumption ic (cost=0.43..2.45 rows=1 width=4) (actual time=0.036..0.036 rows=1 loops=2)

  • Index Cond: (consumptionid = c.consumptionid)
  • Filter: ((status)::text !~~ 'deprecated%'::text)
104. 0.072 0.072 ↑ 1.0 1 2

Index Only Scan using invoice_pkey on invoice i (cost=0.43..1.45 rows=1 width=4) (actual time=0.036..0.036 rows=1 loops=2)

  • Index Cond: (invoiceid = ic.invoiceid)
  • Heap Fetches: 0
105. 0.086 0.086 ↑ 1.0 1 2

Index Scan using invdoc_invoiceid on invdoc id (cost=0.43..0.99 rows=1 width=17) (actual time=0.043..0.043 rows=1 loops=2)

  • Index Cond: (invoiceid = i.invoiceid)
Planning time : 22.588 ms
Execution time : 3,081.316 ms