explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ELGK : EXPLAIN ANALYE ancienne query

Settings
# exclusive inclusive rows x rows loops node
1. 16,337.964 418,289.059 ↓ 1.0 462,590 1

Hash Left Join (cost=4,805,532.09..33,199,845.57 rows=462,557 width=1,130) (actual time=268,390.693..418,289.059 rows=462,590 loops=1)

  • Hash Cond: (sub.currentproviderid = currentsup.parametervalueid)
2.          

Initplan (for Hash Left Join)

3. 0.000 936.625 ↓ 0.0 0 1

Result (cost=54,954.62..54,962.72 rows=60 width=32) (actual time=936.625..936.625 rows=0 loops=1)

4.          

Initplan (for Result)

5. 0.001 936.609 ↓ 0.0 0 1

Limit (cost=54,954.18..54,954.19 rows=1 width=8) (actual time=936.609..936.609 rows=0 loops=1)

6. 0.010 936.608 ↓ 0.0 0 1

Sort (cost=54,954.18..54,954.19 rows=1 width=8) (actual time=936.608..936.608 rows=0 loops=1)

  • Sort Key: index.todate DESC, index.indexid DESC
  • Sort Method: quicksort Memory: 25kB
7. 936.598 936.598 ↓ 0.0 0 1

Index Scan using "IX_index_context_index" on index (cost=0.43..54,954.17 rows=1 width=8) (actual time=936.597..936.598 rows=0 loops=1)

  • Index Cond: ((context)::text = 'INITIAL'::text)
  • Filter: ((externalref)::text = '7793'::text)
  • Rows Removed by Filter: 191,804
8. 0.002 936.624 ↓ 0.0 0 1

ProjectSet (cost=0.43..7.19 rows=60 width=40) (actual time=936.623..936.624 rows=0 loops=1)

9. 936.622 936.622 ↓ 0.0 0 1

Index Scan using "IX_indexdetail_indexid_indexdetail" on indexdetail id (cost=0.43..6.84 rows=6 width=39) (actual time=936.622..936.622 rows=0 loops=1)

  • Index Cond: (indexid = $18)
10. 563.504 300,844.264 ↓ 1.0 462,590 1

Hash Left Join (cost=4,750,366.42..5,138,515.54 rows=462,557 width=560) (actual time=266,722.539..300,844.264 rows=462,590 loops=1)

  • Hash Cond: (co.blocktypeparamid = block.parametervalueid)
11. 708.092 300,280.003 ↓ 1.0 462,590 1

Hash Left Join (cost=4,750,163.48..5,137,098.37 rows=462,557 width=549) (actual time=266,721.748..300,280.003 rows=462,590 loops=1)

  • Hash Cond: (lasthistory.productcodeparamid = lastprod.parametervalueid)
12. 718.966 299,571.211 ↓ 1.0 462,590 1

Hash Left Join (cost=4,749,960.53..5,135,677.08 rows=462,557 width=534) (actual time=266,721.020..299,571.211 rows=462,590 loops=1)

  • Hash Cond: (currenthistory.productcodeparamid = currentprod.parametervalueid)
13. 778.478 298,851.576 ↓ 1.0 462,590 1

Hash Left Join (cost=4,749,757.59..5,134,255.78 rows=462,557 width=519) (actual time=266,720.317..298,851.576 rows=462,590 loops=1)

  • Hash Cond: (firsthistory.productcodeparamid = firstprod.parametervalueid)
14. 735.565 298,072.225 ↓ 1.0 462,590 1

Hash Left Join (cost=4,749,554.64..5,132,834.48 rows=462,557 width=504) (actual time=266,719.355..298,072.225 rows=462,590 loops=1)

  • Hash Cond: ((COALESCE(gc_dgo.netarea, gc_usr.netarea))::text = (netarea.netarea)::text)
15. 4,025.645 297,336.145 ↓ 1.0 462,590 1

Hash Left Join (cost=4,749,550.62..5,131,590.52 rows=462,557 width=500) (actual time=266,718.785..297,336.145 rows=462,590 loops=1)

  • Hash Cond: (co.contractid = q_1.contractid)
16. 3,052.593 279,948.919 ↓ 1.0 462,590 1

Hash Left Join (cost=4,283,920.16..4,664,224.89 rows=462,557 width=488) (actual time=253,357.136..279,948.919 rows=462,590 loops=1)

  • Hash Cond: (co.contractid = q.contractid)
17. 3,375.033 162,877.333 ↓ 1.0 462,590 1

Hash Left Join (cost=3,679,089.34..4,057,658.32 rows=462,557 width=483) (actual time=139,338.028..162,877.333 rows=462,590 loops=1)

  • Hash Cond: (dp.deliverypointid = gc_usr.deliverypointid)
  • Join Filter: (((cdp.todate IS NULL) AND (gc_usr.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (gc_usr.fromdate < cdp.todate) AND ((gc_usr.todate IS NULL) OR (gc_usr.todate >= cdp.todate))))
  • Rows Removed by Join Filter: 799,140
18. 335.739 158,152.837 ↓ 1.0 462,590 1

Hash Left Join (cost=3,630,252.86..3,940,470.52 rows=462,557 width=446) (actual time=137,987.140..158,152.837 rows=462,590 loops=1)

  • Hash Cond: (dp.deliverypointid = lc_usr.deliverypointid)
  • Join Filter: (((cdp.todate IS NULL) AND (lc_usr.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (lc_usr.fromdate < cdp.todate) AND ((lc_usr.todate IS NULL) OR (lc_usr.todate >= cdp.todate))))
  • Rows Removed by Join Filter: 2
19. 3,292.912 157,813.080 ↓ 1.0 462,590 1

Hash Left Join (cost=3,630,251.41..3,938,734.46 rows=462,557 width=442) (actual time=137,983.020..157,813.080 rows=462,590 loops=1)

  • Hash Cond: (dp.deliverypointid = gc_dgo.deliverypointid)
  • Join Filter: (((cdp.todate IS NULL) AND (gc_dgo.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (gc_dgo.fromdate < cdp.todate) AND ((gc_dgo.todate IS NULL) OR (gc_dgo.todate >= cdp.todate))))
  • Rows Removed by Join Filter: 523,340
20. 634.948 152,223.364 ↓ 1.0 462,590 1

Hash Left Join (cost=3,570,062.10..3,807,864.00 rows=462,557 width=405) (actual time=135,685.118..152,223.364 rows=462,590 loops=1)

  • Hash Cond: ((SubPlan 27) = pc_usr.physicalconfigid)
21. 3,135.978 142,020.330 ↓ 1.0 462,590 1

Hash Left Join (cost=3,537,591.95..3,688,448.85 rows=462,557 width=401) (actual time=134,903.458..142,020.330 rows=462,590 loops=1)

  • Hash Cond: (dp.deliverypointid = pc_dgo.deliverypointid)
  • Join Filter: (((cdp.todate IS NULL) AND (pc_dgo.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (pc_dgo.fromdate < cdp.todate) AND ((pc_dgo.todate IS NULL) OR (pc_dgo.todate >= cdp (...)
  • Rows Removed by Join Filter: 522,837
22. 533.386 137,798.352 ↓ 1.0 462,590 1

Hash Left Join (cost=3,503,915.96..3,590,385.30 rows=462,557 width=397) (actual time=133,812.373..137,798.352 rows=462,590 loops=1)

  • Hash Cond: (((brpj.brp)::text = (brp.externalid)::text) AND ((dp.market)::text = (brp.marketcode)::text))
23. 2,280.454 137,264.818 ↓ 1.0 462,590 1

Hash Right Join (cost=3,503,907.91..3,581,227.48 rows=462,557 width=402) (actual time=133,812.176..137,264.818 rows=462,590 loops=1)

  • Hash Cond: (lc_dgo.deliverypointid = dp.deliverypointid)
  • Join Filter: (((cdp.todate IS NULL) AND (lc_dgo.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (lc_dgo.fromdate < cdp.todate) AND ((lc_dgo.todate IS NULL) OR (lc_dgo.t (...)
  • Rows Removed by Join Filter: 523,247
24. 1,175.682 1,175.682 ↓ 1.0 574,695 1

Seq Scan on logicalconfig lc_dgo (cost=0.00..35,406.52 rows=573,285 width=16) (actual time=0.785..1,175.682 rows=574,695 loops=1)

  • Filter: ((NOT deleted) AND ((sourceid)::text = 'DGO'::text) AND ((status)::text = 'ACTUAL'::text))
  • Rows Removed by Filter: 199,073
25. 1,348.379 133,808.682 ↓ 1.0 462,590 1

Hash (cost=3,474,184.95..3,474,184.95 rows=462,557 width=398) (actual time=133,808.682..133,808.682 rows=462,590 loops=1)

  • Buckets: 16,384 Batches: 64 Memory Usage: 2,311kB
26. 688.082 132,460.303 ↓ 1.0 462,590 1

Hash Left Join (cost=1,506,332.96..3,474,184.95 rows=462,557 width=398) (actual time=118,712.780..132,460.303 rows=462,590 loops=1)

  • Hash Cond: (((dp.gridoperator)::text = (dgo_encom.gridoperator)::text) AND ((dp.regulator)::text = (dgo_hgz.regulator)::text) AND ((dp.market)::text = (dgo_hg (...)
27. 2,469.498 131,771.675 ↓ 1.0 462,590 1

Hash Left Join (cost=1,506,209.03..3,467,817.22 rows=462,557 width=292) (actual time=118,712.057..131,771.675 rows=462,590 loops=1)

  • Hash Cond: (per.deliveryperiodid = brpj.deliveryperiodid)
  • Join Filter: (((cdp.todate IS NULL) AND (brpj.todate IS NULL)) OR ((cdp.todate IS NOT NULL) AND (brpj.fromdate < cdp.todate) AND ((brpj.todate IS NULL) (...)
  • Rows Removed by Join Filter: 98,984
28. 1,077.760 128,832.488 ↓ 1.0 462,590 1

Merge Right Join (cost=1,487,802.45..3,402,268.56 rows=462,557 width=283) (actual time=118,237.759..128,832.488 rows=462,590 loops=1)

  • Merge Cond: (freeaddressesdetail.addressid = dp.addressid)
29. 513.166 8,666.528 ↓ 83.9 359,453 1

Nested Loop Left Join (cost=1.13..4,146,077.87 rows=4,285 width=54) (actual time=0.555..8,666.528 rows=359,453 loops=1)

30. 3,839.926 7,793.909 ↓ 83.9 359,453 1

Nested Loop (cost=0.85..4,138,821.28 rows=4,285 width=107) (actual time=0.259..7,793.909 rows=359,453 loops=1)

  • -> Index Scan using freeadddetail_addressid_idx on freeaddressesdetail (cost=0.42..4130279.17 rows=4,285 width=39) (actual time=0.244 (...)
  • Filter: ((((addressid)::text || ';'::text) || (addressdetailnbr)::text) = (SubPlan 26))
  • -> Index Scan using freeaddresses_pkey on freeaddresses (cost=0.42..1.99 rows=1 width=72) (actual time=0.005..0.005 rows=1 loops=359 (...)
  • Index Cond: (addressid = freeaddressesdetail.addressid)
31.          

SubPlan (for Nested Loop)

32. 718.906 3,953.983 ↑ 1.0 1 359,453

Limit (cost=4.76..4.77 rows=1 width=36) (actual time=0.010..0.011 rows=1 loops=359,453)

  • -> Index Scan using property_pkey on property (cost=0.27..2.29 rows=1 width=7) (actual time=0.095..0.096 rows=1 loop (...)
  • Index Cond: ((propertycode)::text = 'defaultCustomerLanguageCode'::text)
33. 3,235.077 3,235.077 ↑ 1.0 1 359,453

Sort (cost=2.47..2.48 rows=1 width=36) (actual time=0.009..0.009 rows=1 loops=359,453)

  • Sort Key: (CASE WHEN ((freeaddressesdetail_1.language)::text = ($43)::text) THEN 1 WHEN ((freeaddressesdetail_1.la (...)
  • Sort Method: quicksort Memory: 25kB
  • -> Index Scan using freeadddetail_addressid_idx on freeaddressesdetail freeaddressesdetail_1 (cost=0.42..2.46 ro (...)
  • Index Cond: (addressid = freeaddressesdetail.addressid)
34. 359.453 359.453 ↓ 0.0 0 359,453

Index Scan using town_pkey on town t (cost=0.28..1.69 rows=1 width=22) (actual time=0.001..0.001 rows=0 loops=359,453)

  • Index Cond: (((country)::text = (freeaddresses.country)::text) AND ((postalcode)::text = (freeaddresses.postalcode)::text) AND (townco (...)
  • Filter: ((postalcode)::text <> 'UNKNOWN'::text)
  • Rows Removed by Filter: 0
35. 214.767 119,088.200 ↓ 1.0 462,590 1

Materialize (cost=1,487,801.32..1,490,114.11 rows=462,557 width=237) (actual time=118,237.188..119,088.200 rows=462,590 loops=1)

36. 2,182.334 118,873.433 ↓ 1.0 462,590 1

Sort (cost=1,487,801.32..1,488,957.72 rows=462,557 width=237) (actual time=118,237.183..118,873.433 rows=462,590 loops=1)

  • Sort Key: dp.addressid
  • Sort Method: external merge Disk: 90,552kB
37. 2,077.193 116,691.099 ↓ 1.0 462,590 1

Hash Left Join (cost=341,642.10..1,384,648.39 rows=462,557 width=237) (actual time=39,955.290..116,691.099 rows=462,590 loops=1)

  • Hash Cond: (per.deliverypointid = dp.deliverypointid)
38. 48,813.941 114,098.895 ↓ 1.0 462,590 1

Hash Left Join (cost=322,370.95..1,335,445.02 rows=462,557 width=198) (actual time=39,439.360..114,098.895 rows=462,590 loops=1)

  • Hash Cond: ((co.contractid = lasthistory.contractid) AND ((SubPlan 21) = lasthistory.contracthistentry))
  • -> Hash Left Join (cost=275,432.72..1218605.09 rows=462,557 width=178) (actual time=38,245.822..93416.938 rows=462,590 loops (...)
  • Hash Cond: ((co.contractid = currenthistory.contractid) AND ((SubPlan 19) = currenthistory.contracthistentry))
  • -> Hash Left Join (cost=228,494.50..1104359.53 rows=462,557 width=158) (actual time=27,869.441..62122.765 rows=462,590 (...)
  • Hash Cond: (cdp.contractdeliveryid = sub.contractdeliveryid)
  • -> Hash Left Join (cost=203,618.87..1056554.68 rows=462,557 width=142) (actual time=27,079.740..59606.980 rows= (...)
  • Hash Cond: (cdp.deliveryperiodid = per.deliveryperiodid)
  • -> Hash Left Join (cost=185,441.15..1016680.74 rows=462,557 width=138) (actual time=26,513.177..57556.432 (...)
  • Hash Cond: ((co.contractid = cdp.contractid) AND ((SubPlan 22) = cdp.contractdeliveryid))
  • -> Hash Right Join (cost=158,233.35..911262.64 rows=462,557 width=118) (actual time=25,482.402..347 (...)
  • Hash Cond: (cj.contractid = co.contractid)
  • -> Seq Scan on contractjournal cj (cost=0.00..744809.20 rows=3,716 width=9) (actual time=6. (...)
  • Filter: (journalentry = (SubPlan 24))
  • Rows Removed by Filter: 280,637
  • -> Result (cost=0.95..0.96 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops= (...)
  • -> Limit (cost=0.42..0.95 rows=1 width=4) (actual time=0.007..0.008 rows=1 (...)
  • -> Index Only Scan Backward using contractjournal_pkey on contractjou (...)
  • Index Cond: ((contractid = cj.contractid) AND (journalentry IS N (...)
  • Heap Fetches: 0
  • -> Hash (cost=144,320.39..144320.39 rows=462,557 width=113) (actual time=25,461.773..25461.77 (...)
  • Buckets: 32,768 Batches: 32 Memory Usage: 1,800kB
  • -> Hash Left Join (cost=58,505.13..144320.39 rows=462,557 width=113) (actual time=1,782 (...)
  • Hash Cond: (co.contractstatusparamid = stat.parametervalueid)
  • -> Hash Left Join (cost=58,302.19..142899.09 rows=462,557 width=93) (actual time (...)
  • Hash Cond: (co.supplierid = s.supplierid)
  • -> Hash Left Join (cost=58,279.59..141653.09 rows=462,557 width=65) (actua (...)
  • Hash Cond: ((co.contractid = firsthistory.contractid) AND ((SubPlan (...)
  • -> Hash Right Join (cost=11,341.36..40171.17 rows=462,557 width=45) (...)
  • Hash Cond: (co.customerid = cu.customerid)
  • -> Seq Scan on contract co (cost=0.00..19238.57 rows=462,557 (...)
  • -> Hash (cost=7,251.05..7251.05 rows=235,305 width=14) (actual (...)
  • Buckets: 131,072 Batches: 4 Memory Usage: 3,790kB
  • -> Seq Scan on customer cu (cost=0.00..7251.05 rows=23 (...)
  • -> Hash (cost=23,378.29..23378.29 rows=1,078,929 width=28) (actual ti (...)
  • Buckets: 65,536 Batches: 32 Memory Usage: 2,351kB
  • -> Seq Scan on contracthistory firsthistory (cost=0.00..2337 (...)
  • -> Result (cost=1.57..1.58 rows=1 width=4) (actual time=0.020..0 (...)
  • -> Limit (cost=0.43..1.57 rows=1 width=4) (actual time=0 (...)
  • -> Index Only Scan using "Key4" on contracthistory (...)
  • Index Cond: ((contractid = co.contractid) AND (...)
  • Heap Fetches: 925,114
  • -> Hash (cost=15.60..15.60 rows=560 width=36) (actual time=0.074..0.074 (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • -> Seq Scan on supplier s (cost=0.00..15.60 rows=560 width=36) (ac (...)
  • -> Hash (cost=187.42..187.42 rows=1,242 width=28) (actual time=4.925..4.925 row (...)
  • Buckets: 2,048 Batches: 1 Memory Usage: 82kB
  • -> Seq Scan on parametervalue stat (cost=0.00..187.42 rows=1,242 width=28 (...)
  • -> Hash (cost=17,452.32..17452.32 rows=467,632 width=20) (actual time=946.761..946.762 rows=467,632 (...)
  • Buckets: 65,536 Batches: 8 Memory Usage: 3,414kB
  • -> Seq Scan on contractdelivery cdp (cost=0.00..17452.32 rows=467,632 width=20) (actual tim (...)
  • -> Hash (cost=11,845.43..11845.43 rows=385,943 width=8) (actual time=505.578..505.579 rows=384,164 loops= (...)
  • Buckets: 131,072 Batches: 8 Memory Usage: 2,904kB
  • -> Seq Scan on deliveryperiod per (cost=0.00..11845.43 rows=385,943 width=8) (actual time=0.262.. (...)
39. 788.057 788.057 ↑ 1.0 467,628 1

Hash (cost=16,289.28..16,289.28 rows=467,628 width=24) (actual time=788.056..788.057 rows=467,628 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,945kB
  • -> Seq Scan on subscription sub (cost=0.00..16289.28 rows=467,628 width=24) (actual time=56.508..506.31 (...)
40. 1,372.935 1,372.935 ↓ 1.0 1,078,930 1

Hash (cost=23,378.29..23,378.29 rows=1,078,929 width=28) (actual time=1,372.935..1,372.935 rows=1,078,930 loops=1)

  • Buckets: 65,536 Batches: 32 Memory Usage: 2,351kB
  • -> Seq Scan on contracthistory currenthistory (cost=0.00..23378.29 rows=1,078,929 width=28) (actual time=0.043 (...)
41. 1,192.333 1,192.333 ↓ 1.0 1,078,930 1

Hash (cost=23,378.29..23,378.29 rows=1,078,929 width=28) (actual time=1,192.333..1,192.333 rows=1,078,930 loops=1)

  • Buckets: 65,536 Batches: 32 Memory Usage: 2,351kB
  • -> Seq Scan on contracthistory lasthistory (cost=0.00..23378.29 rows=1,078,929 width=28) (actual time=0.034..550.031 (...)
42.          

SubPlan (for Hash Left Join)

43. 925.144 19,428.024 ↑ 1.0 1 925,144

Limit (cost=2.45..2.45 rows=1 width=8) (actual time=0.020..0.021 rows=1 loops=925,144)

44. 18,502.880 18,502.880 ↑ 1.0 1 925,144

Sort (cost=2.45..2.45 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=925,144)

  • Sort Key: cdp2_1.todate DESC
  • Sort Method: quicksort Memory: 25kB
  • -> Index Scan using contractdelively_contract_id_idx on contractdelivery cdp2_1 (c (...)
  • Index Cond: (contractid = co.contractid)
45. 1,846.628 26,776.106 ↑ 1.0 1 923,314

Result (cost=1.58..1.59 rows=1 width=4) (actual time=0.028..0.029 rows=1 loops=923,314)

46.          

Initplan (for Result)

47. 24,929.478 24,929.478 ↑ 1.0 1 923,314

Limit (cost=0.43..1.58 rows=1 width=4) (actual time=0.027..0.027 rows=1 loops=923,314)

  • -> Index Scan Backward using "Key4" on contracthistory ch2_1 (cost=0.43..5.03 rows=4 width=4) (act (...)
  • Index Cond: ((contractid = co.contractid) AND (contracthistentry IS NOT NULL))
  • Filter: (startdate < now())
  • Rows Removed by Filter: 0
48. 925.147 15,727.499 ↑ 1.0 1 925,147

Result (cost=1.57..1.58 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=925,147)

49.          

Initplan (for Result)

50. 14,802.352 14,802.352 ↑ 1.0 1 925,147

Limit (cost=0.43..1.57 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=925,147)

  • -> Index Only Scan Backward using "Key4" on contracthistory ch2_2 (cost=0.43..5.01 rows=4 width=4) (actu (...)
  • Index Cond: ((contractid = co.contractid) AND (contracthistentry IS NOT NULL))
  • Heap Fetches: 925,114
51. 515.011 515.011 ↑ 1.1 359,452 1

Hash (cost=10,987.18..10,987.18 rows=389,118 width=43) (actual time=515.011..515.011 rows=359,452 loops=1)

  • Buckets: 65,536 Batches: 16 Memory Usage: 2,227kB
  • -> Seq Scan on deliverypoint dp (cost=0.00..10987.18 rows=389,118 width=43) (actual time=1.098..272.440 rows=359,452 loops (...)
52. 210.755 469.689 ↑ 1.0 409,981 1

Hash (cost=10,478.81..10,478.81 rows=409,981 width=25) (actual time=469.689..469.689 rows=409,981 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,323kB
53. 258.934 258.934 ↑ 1.0 409,981 1

Seq Scan on deliveryperiodbrpjournal brpj (cost=0.00..10,478.81 rows=409,981 width=25) (actual time=1.485..258.934 rows=409,981 loops=1)

54. 0.065 0.546 ↓ 1.5 62 1

Hash (cost=123.20..123.20 rows=42 width=155) (actual time=0.546..0.546 rows=62 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
55. 0.045 0.481 ↓ 1.5 62 1

Nested Loop Left Join (cost=13.61..123.20 rows=42 width=155) (actual time=0.340..0.481 rows=62 loops=1)

56. 0.057 0.436 ↓ 1.5 62 1

Hash Left Join (cost=13.19..20.51 rows=42 width=114) (actual time=0.332..0.436 rows=62 loops=1)

  • Hash Cond: (dgo_hgz.gridoperatorid = dgoac.actorid)
57. 0.037 0.275 ↓ 1.5 62 1

Hash Join (cost=5.34..12.54 rows=42 width=87) (actual time=0.195..0.275 rows=62 loops=1)

  • Hash Cond: (a.actorid = dgo_hgz.gridoperatorid)
58. 0.060 0.161 ↓ 1.2 64 1

Hash Join (cost=1.92..8.97 rows=54 width=79) (actual time=0.103..0.161 rows=64 loops=1)

  • Hash Cond: ((a.externalid)::text = (dgo_encom.gridoperator)::text)
59. 0.028 0.028 ↑ 1.0 82 1

Seq Scan on actor a (cost=0.00..6.82 rows=82 width=24) (actual time=0.013..0.028 rows=82 loops=1)

60. 0.049 0.073 ↓ 1.0 42 1

Hash (cost=1.41..1.41 rows=41 width=64) (actual time=0.073..0.073 rows=42 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
61. 0.024 0.024 ↓ 1.0 42 1

Seq Scan on gridoperator dgo_encom (cost=0.00..1.41 rows=41 width=64) (actual time=0.017..0.024 rows=42 loops=1)

62. 0.035 0.077 ↑ 1.0 63 1

Hash (cost=2.63..2.63 rows=63 width=12) (actual time=0.077..0.077 rows=63 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
63. 0.042 0.042 ↑ 1.0 63 1

Seq Scan on gridoperator dgo_hgz (cost=0.00..2.63 rows=63 width=12) (actual time=0.024..0.042 rows=63 loops=1)

64. 0.065 0.104 ↑ 1.0 82 1

Hash (cost=6.82..6.82 rows=82 width=31) (actual time=0.104..0.104 rows=82 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
65. 0.039 0.039 ↑ 1.0 82 1

Seq Scan on actor dgoac (cost=0.00..6.82 rows=82 width=31) (actual time=0.006..0.039 rows=82 loops=1)

66. 0.000 0.000 ↓ 0.0 0 62

Index Scan using freeaddresses_pkey on freeaddresses dgoadd (cost=0.43..2.45 rows=1 width=49) (actual time=0.000..0.000 rows=0 loops=62)

  • Index Cond: (addressid = dgoac.addressid)
67. 0.068 0.148 ↑ 1.0 81 1

Hash (cost=6.82..6.82 rows=82 width=22) (actual time=0.148..0.148 rows=81 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
68. 0.080 0.080 ↑ 1.0 82 1

Seq Scan on actor brp (cost=0.00..6.82 rows=82 width=22) (actual time=0.018..0.080 rows=82 loops=1)

69. 307.546 1,086.000 ↓ 1.0 574,082 1

Hash (cost=23,699.10..23,699.10 rows=573,911 width=16) (actual time=1,086.000..1,086.000 rows=574,082 loops=1)

  • Buckets: 131,072 Batches: 16 Memory Usage: 2,625kB
70. 778.454 778.454 ↓ 1.0 574,082 1

Seq Scan on physicalconfig pc_dgo (cost=0.00..23,699.10 rows=573,911 width=16) (actual time=0.314..778.454 rows=574,082 loops=1)

  • Filter: ((NOT deleted) AND ((sourceid)::text = 'DGO'::text) AND ((status)::text = 'ACTUAL'::text))
  • Rows Removed by Filter: 194,186
71. 320.655 778.800 ↑ 1.0 768,268 1

Hash (cost=19,854.40..19,854.40 rows=768,940 width=4) (actual time=778.800..778.800 rows=768,268 loops=1)

  • Buckets: 131,072 Batches: 16 Memory Usage: 2,719kB
72. 458.145 458.145 ↑ 1.0 768,268 1

Seq Scan on physicalconfig pc_usr (cost=0.00..19,854.40 rows=768,940 width=4) (actual time=0.039..458.145 rows=768,268 loops=1)

73.          

SubPlan (for Hash Left Join)

74. 462.594 8,789.286 ↓ 0.0 0 462,594

Limit (cost=1.46..1.47 rows=1 width=4) (actual time=0.019..0.019 rows=0 loops=462,594)

75. 925.188 8,326.692 ↓ 0.0 0 462,594

Sort (cost=1.46..1.47 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=462,594)

  • Sort Key: pc.physicalconfigid DESC
  • Sort Method: quicksort Memory: 25kB
76. 7,401.504 7,401.504 ↓ 0.0 0 462,594

Index Scan using physicalconfig_sourceid_idx on physicalconfig pc (cost=0.42..1.45 rows=1 width=4) (actual time=0.016..0.016 rows=0 loops=462,594)

  • Index Cond: ((sourceid)::text = 'USER'::text)
  • Filter: ((NOT deleted) AND ((status)::text = 'ACTUAL'::text) AND (deliverypointid = dp.deliverypointid) AND (((cdp.todate IS NULL) AND (todate IS NULL)) OR ((cdp.todate (...)
  • Rows Removed by Filter: 5
77. 484.162 2,296.804 ↑ 1.1 574,695 1

Hash (cost=45,789.22..45,789.22 rows=646,727 width=49) (actual time=2,296.804..2,296.804 rows=574,695 loops=1)

  • Buckets: 65,536 Batches: 16 Memory Usage: 3,201kB
78. 1,812.642 1,812.642 ↑ 1.1 574,695 1

Seq Scan on generalconfig gc_dgo (cost=0.00..45,789.22 rows=646,727 width=49) (actual time=0.056..1,812.642 rows=574,695 loops=1)

  • Filter: ((NOT deleted) AND ((sourceid)::text = 'DGO'::text) AND ((status)::text = 'ACTUAL'::text))
  • Rows Removed by Filter: 664,631
79. 0.048 4.018 ↓ 4.0 4 1

Hash (cost=1.45..1.45 rows=1 width=16) (actual time=4.018..4.018 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
80. 3.970 3.970 ↓ 4.0 4 1

Index Scan using logicalconfig_sourceid_idx on logicalconfig lc_usr (cost=0.42..1.45 rows=1 width=16) (actual time=2.070..3.970 rows=4 loops=1)

  • Index Cond: ((sourceid)::text = 'USER'::text)
  • Filter: ((NOT deleted) AND ((status)::text = 'ACTUAL'::text))
81. 365.749 1,349.463 ↓ 1.2 467,632 1

Hash (cost=39,961.32..39,961.32 rows=398,573 width=49) (actual time=1,349.463..1,349.463 rows=467,632 loops=1)

  • Buckets: 65,536 Batches: 16 Memory Usage: 2,564kB
82. 858.331 983.714 ↓ 1.2 467,632 1

Bitmap Heap Scan on generalconfig gc_usr (cost=5,670.15..39,961.32 rows=398,573 width=49) (actual time=131.667..983.714 rows=467,632 loops=1)

  • Recheck Cond: ((sourceid)::text = 'USER'::text)
  • Filter: ((NOT deleted) AND ((status)::text = 'ACTUAL'::text))
  • Heap Blocks: exact=27,199
83. 125.383 125.383 ↑ 1.0 467,632 1

Bitmap Index Scan on generalconfig_sourceid_id (cost=0.00..5,570.51 rows=472,411 width=0) (actual time=125.383..125.383 rows=467,632 loops=1)

  • Index Cond: ((sourceid)::text = 'USER'::text)
84. 507.547 114,018.993 ↓ 3,630.3 424,746 1

Hash (cost=604,829.35..604,829.35 rows=117 width=9) (actual time=114,018.992..114,018.993 rows=424,746 loops=1)

  • Buckets: 131,072 (originally 1024) Batches: 8 (originally 1) Memory Usage: 3,161kB
85. 505.980 113,511.446 ↓ 3,630.3 424,746 1

Nested Loop Left Join (cost=603,310.88..604,829.35 rows=117 width=9) (actual time=34,467.809..113,511.446 rows=424,746 loops=1)

86. 756.260 97,714.610 ↓ 3,630.3 424,746 1

Nested Loop Left Join (cost=603,310.44..604,457.27 rows=117 width=13) (actual time=34,465.715..97,714.610 rows=424,746 loops=1)

87. 760.862 73,597.320 ↓ 3,630.3 424,746 1

Nested Loop Left Join (cost=603,310.00..604,237.18 rows=117 width=8) (actual time=34,461.166..73,597.320 rows=424,746 loops=1)

88. 1,743.255 63,067.300 ↓ 3,630.3 424,746 1

Subquery Scan on q (cost=603,309.57..604,067.24 rows=117 width=8) (actual time=34,459.805..63,067.300 rows=424,746 loops=1)

  • Filter: (q.rank = 1)
  • Rows Removed by Filter: 11,113,915
89. 20,578.314 61,324.045 ↓ 494.9 11,538,661 1

WindowAgg (cost=603,309.57..603,775.83 rows=23,313 width=24) (actual time=34,459.802..61,324.045 rows=11,538,661 loops=1)

90. 25,144.095 40,745.731 ↓ 494.9 11,538,661 1

Sort (cost=603,309.57..603,367.85 rows=23,313 width=8) (actual time=34,459.768..40,745.731 rows=11,538,661 loops=1)

  • Sort Key: i.contractid, i.invoiceid DESC
  • Sort Method: external merge Disk: 203,280kB
91. 2,082.721 15,601.636 ↓ 494.9 11,538,661 1

Gather (cost=1,003.27..601,618.34 rows=23,313 width=8) (actual time=12.655..15,601.636 rows=11,538,661 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
92. 1,938.434 13,518.915 ↓ 395.9 3,846,220 3 / 3

Hash Join (cost=3.27..598,287.04 rows=9,714 width=8) (actual time=1.530..13,518.915 rows=3,846,220 loops=3)

  • Hash Cond: (i.invoicenatureparamid = pv.parametervalueid)
93. 11,580.101 11,580.101 ↑ 1.2 4,826,753 3 / 3

Parallel Seq Scan on invoice i (cost=0.00..582,395.38 rows=6,032,138 width=12) (actual time=0.251..11,580.101 rows=4,826,753 loops=3)

94. 0.380 0.380 ↑ 1.0 2 3 / 3

Hash (cost=3.24..3.24 rows=2 width=4) (actual time=0.380..0.380 rows=2 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • -> Index Scan using parametervalue_internalparametervaluecode_idx on parametervalue pv (cost=0.28..3.24 rows=2 width=4) (actual time=0.296..0.326 rows (...)
  • Index Cond: ((internalparametervaluecode)::text = 'instalment'::text)
95. 9,769.158 9,769.158 ↑ 1.0 1 424,746

Index Only Scan using invoice_pkey on invoice lastinstal_i (cost=0.43..1.45 rows=1 width=4) (actual time=0.023..0.023 rows=1 loops=424,746)

  • Index Cond: (invoiceid = q.invoiceid)
  • Heap Fetches: 663
96. 23,361.030 23,361.030 ↑ 1.0 1 424,746

Index Scan using invdoc_invoiceid on invdoc lastinstal_id (cost=0.43..1.87 rows=1 width=9) (actual time=0.055..0.055 rows=1 loops=424,746)

  • Index Cond: (invoiceid = lastinstal_i.invoiceid)
97. 15,290.856 15,290.856 ↑ 14.0 1 424,746

Index Scan using index_invoicerelation_finalinvoiceid on invoicerelation lastinstal_template_cr (cost=0.44..3.04 rows=14 width=8) (actual time=0.035..0.036 rows=1 loops=424,746)

  • Index Cond: (finalinvoiceid = lastinstal_i.invoiceid)
  • Filter: ((nature)::text = 'TEMPLATED'::text)
  • Rows Removed by Filter: 0
98. 356.662 13,361.581 ↓ 6,521.0 378,216 1

Hash (cost=465,629.73..465,629.73 rows=58 width=16) (actual time=13,361.580..13,361.581 rows=378,216 loops=1)

  • Buckets: 131,072 (originally 1024) Batches: 8 (originally 1) Memory Usage: 3,312kB
99. 444.843 13,004.919 ↓ 6,521.0 378,216 1

Nested Loop Left Join (cost=465,109.10..465,629.73 rows=58 width=16) (actual time=3,595.024..13,004.919 rows=378,216 loops=1)

100. 266.431 7,265.052 ↓ 6,521.0 378,216 1

Subquery Scan on q_1 (cost=465,108.67..465,487.49 rows=58 width=8) (actual time=3,594.921..7,265.052 rows=378,216 loops=1)

  • Filter: (q_1.rank = 1)
  • Rows Removed by Filter: 995,016
101. 2,632.744 6,998.621 ↓ 117.8 1,373,232 1

WindowAgg (cost=465,108.67..465,341.79 rows=11,656 width=24) (actual time=3,594.917..6,998.621 rows=1,373,232 loops=1)

102. 2,318.445 4,365.877 ↓ 117.8 1,373,232 1

Sort (cost=465,108.67..465,137.81 rows=11,656 width=8) (actual time=3,594.885..4,365.877 rows=1,373,232 loops=1)

  • Sort Key: i_1.contractid, i_1.invoiceid DESC
  • Sort Method: external merge Disk: 24,256kB
103. 297.632 2,047.432 ↓ 117.8 1,373,232 1

Nested Loop (cost=0.84..464,321.38 rows=11,656 width=8) (actual time=0.379..2,047.432 rows=1,373,232 loops=1)

104. 0.052 0.052 ↑ 1.0 1 1

Index Scan using parametervalue_internalparametervaluecode_idx on parametervalue pv_1 (cost=0.28..2.29 rows=1 width=4) (actual time=0.050..0.052 rows=1 loops=1)

  • Index Cond: ((internalparametervaluecode)::text = 'instalmentTemplate'::text)
105. 1,749.748 1,749.748 ↑ 1.1 1,373,232 1

Index Scan using invoice_invoicenatureparamid_idx on invoice i_1 (cost=0.56..449,841.95 rows=1,447,713 width=12) (actual time=0.323..1,749.748 rows=1,373,232 loops=1)

  • Index Cond: (invoicenatureparamid = pv_1.parametervalueid)
106. 5,295.024 5,295.024 ↑ 1.0 1 378,216

Index Scan using invoice_pkey on invoice very_lastinstal_template (cost=0.43..2.45 rows=1 width=16) (actual time=0.014..0.014 rows=1 loops=378,216)

  • Index Cond: (invoiceid = q_1.invoiceid)
107. 0.043 0.515 ↓ 1.4 126 1

Hash (cost=2.90..2.90 rows=90 width=23) (actual time=0.515..0.515 rows=126 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
108. 0.472 0.472 ↓ 1.4 126 1

Seq Scan on netarea (cost=0.00..2.90 rows=90 width=23) (actual time=0.430..0.472 rows=126 loops=1)

109. 0.334 0.873 ↑ 1.1 1,142 1

Hash (cost=187.42..187.42 rows=1,242 width=19) (actual time=0.873..0.873 rows=1,142 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 74kB
110. 0.539 0.539 ↑ 1.1 1,142 1

Seq Scan on parametervalue firstprod (cost=0.00..187.42 rows=1,242 width=19) (actual time=0.010..0.539 rows=1,142 loops=1)

111. 0.329 0.669 ↑ 1.1 1,142 1

Hash (cost=187.42..187.42 rows=1,242 width=19) (actual time=0.669..0.669 rows=1,142 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 74kB
112. 0.340 0.340 ↑ 1.1 1,142 1

Seq Scan on parametervalue currentprod (cost=0.00..187.42 rows=1,242 width=19) (actual time=0.006..0.340 rows=1,142 loops=1)

113. 0.334 0.700 ↑ 1.1 1,142 1

Hash (cost=187.42..187.42 rows=1,242 width=19) (actual time=0.700..0.700 rows=1,142 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 74kB
114. 0.366 0.366 ↑ 1.1 1,142 1

Seq Scan on parametervalue lastprod (cost=0.00..187.42 rows=1,242 width=19) (actual time=0.006..0.366 rows=1,142 loops=1)

115. 0.371 0.757 ↑ 1.1 1,142 1

Hash (cost=187.42..187.42 rows=1,242 width=19) (actual time=0.757..0.757 rows=1,142 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 75kB
116. 0.386 0.386 ↑ 1.1 1,142 1

Seq Scan on parametervalue block (cost=0.00..187.42 rows=1,242 width=19) (actual time=0.007..0.386 rows=1,142 loops=1)

117. 0.355 0.712 ↑ 1.1 1,142 1

Hash (cost=187.42..187.42 rows=1,242 width=19) (actual time=0.712..0.712 rows=1,142 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 75kB
118. 0.357 0.357 ↑ 1.1 1,142 1

Seq Scan on parametervalue currentsup (cost=0.00..187.42 rows=1,242 width=19) (actual time=0.009..0.357 rows=1,142 loops=1)

119.          

SubPlan (for Hash Left Join)

120. 1,387.770 37,007.200 ↑ 1.0 1 462,590

Aggregate (cost=8.88..8.89 rows=1 width=4) (actual time=0.080..0.080 rows=1 loops=462,590)

121. 35,619.430 35,619.430 ↓ 2.0 2 462,590

Index Scan using idx_contractrateid_contractid on contractrate cr (cost=0.43..8.88 rows=1 width=4) (actual time=0.063..0.077 rows=2 loops=462,590)

  • Index Cond: (contractid = co.contractid)
  • Filter: (((todate IS NULL) OR (todate > currenthistory.startdate)) AND (fromdate < COALESCE((currenthistory.forcedenddate)::timestamp without time zone, (currenthistory.startdate + (((currenthistory.duration)::text || 'months'::text))::inte (...)
  • Rows Removed by Filter: 3
122. 925.180 7,401.440 ↑ 1.0 1 462,590

Aggregate (cost=8.88..8.89 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=462,590)

123. 6,476.260 6,476.260 ↓ 2.0 2 462,590

Index Scan using idx_contractrateid_contractid on contractrate cr_1 (cost=0.43..8.88 rows=1 width=4) (actual time=0.010..0.014 rows=2 loops=462,590)

  • Index Cond: (contractid = co.contractid)
  • Filter: (((todate IS NULL) OR (todate > lasthistory.startdate)) AND (fromdate < COALESCE((lasthistory.forcedenddate)::timestamp without time zone, (lasthistory.startdate + (((lasthistory.duration)::text || 'months'::text))::interval))))
  • Rows Removed by Filter: 3
124. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..7.35 rows=1 width=0) (never executed)

125. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_attestation_customerid_pk on attestation a_1 (cost=0.29..5.17 rows=1 width=4) (never executed)

  • Index Cond: (customerid = cu.customerid)
  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate >= now())))
126. 0.000 0.000 ↓ 0.0 0

Index Only Scan using attestationcategory_pkey on attestationcategory ac (cost=0.14..2.16 rows=1 width=4) (never executed)

  • Index Cond: (attestationcategoryid = a_1.attestationcategoryid)
  • Heap Fetches: 0
127. 3.510 49.224 ↓ 1.0 6,186 1

Hash Join (cost=15.62..1,612.82 rows=6,138 width=4) (actual time=0.638..49.224 rows=6,186 loops=1)

  • Hash Cond: (a_2.attestationcategoryid = ac_1.attestationcategoryid)
128. 45.336 45.336 ↓ 1.0 6,186 1

Seq Scan on attestation a_2 (cost=0.00..1,580.80 rows=6,138 width=8) (actual time=0.233..45.336 rows=6,186 loops=1)

  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate >= now())))
  • Rows Removed by Filter: 35,004
129. 0.007 0.378 ↑ 35.7 7 1

Hash (cost=12.50..12.50 rows=250 width=4) (actual time=0.378..0.378 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
130. 0.371 0.371 ↑ 35.7 7 1

Seq Scan on attestationcategory ac_1 (cost=0.00..12.50 rows=250 width=4) (actual time=0.367..0.371 rows=7 loops=1)

131. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..7.36 rows=1 width=0) (never executed)

132. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_attestation_customerid_pk on attestation a_3 (cost=0.29..5.17 rows=1 width=4) (never executed)

  • Index Cond: (customerid = cu.customerid)
  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate >= now())))
133. 0.000 0.000 ↓ 0.0 0

Index Scan using attestationcategory_pkey on attestationcategory ac_2 (cost=0.14..2.16 rows=1 width=4) (never executed)

  • Index Cond: (attestationcategoryid = a_3.attestationcategoryid)
  • Filter: socialinvoiced
134. 3.999 36.524 ↓ 2.0 6,169 1

Hash Join (cost=14.06..1,611.25 rows=3,069 width=4) (actual time=0.090..36.524 rows=6,169 loops=1)

  • Hash Cond: (a_4.attestationcategoryid = ac_3.attestationcategoryid)
135. 32.499 32.499 ↓ 1.0 6,186 1

Seq Scan on attestation a_4 (cost=0.00..1,580.80 rows=6,138 width=8) (actual time=0.031..32.499 rows=6,186 loops=1)

  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate >= now())))
  • Rows Removed by Filter: 35,004
136. 0.006 0.026 ↑ 20.8 6 1

Hash (cost=12.50..12.50 rows=125 width=4) (actual time=0.026..0.026 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
137. 0.020 0.020 ↑ 20.8 6 1

Seq Scan on attestationcategory ac_3 (cost=0.00..12.50 rows=125 width=4) (actual time=0.016..0.020 rows=6 loops=1)

  • Filter: socialinvoiced
  • Rows Removed by Filter: 1
138. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.71..15.39 rows=1 width=0) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_contractrateid_contractid on contractrate cr_2 (cost=0.43..8.77 rows=2 width=4) (never executed)

  • Index Cond: (contractid = co.contractid)
  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate > now())))
140. 0.000 0.000 ↓ 0.0 0

Index Scan using rate_rateid_key on rate r (cost=0.28..2.30 rows=1 width=4) (never executed)

  • Index Cond: (rateid = cr_2.rateid)
  • Filter: ((social IS TRUE) AND (socialinvoiced IS TRUE))
141. 1.446 479.449 ↓ 78.4 5,408 1

Nested Loop (cost=0.43..3,279.71 rows=69 width=4) (actual time=1.792..479.449 rows=5,408 loops=1)

142. 19.759 19.759 ↓ 3.0 3 1

Seq Scan on rate r_1 (cost=0.00..409.56 rows=1 width=4) (actual time=0.076..19.759 rows=3 loops=1)

  • Filter: ((social IS TRUE) AND (socialinvoiced IS TRUE))
  • Rows Removed by Filter: 6,953
143. 458.244 458.244 ↓ 2.1 1,803 3

Index Scan using contractrate_rateid_index on contractrate cr_3 (cost=0.43..2,861.55 rows=860 width=8) (actual time=0.834..152.748 rows=1,803 loops=3)

  • Index Cond: (rateid = r_1.rateid)
  • Filter: ((fromdate <= now()) AND ((todate IS NULL) OR (todate > now())))
  • Rows Removed by Filter: 4,655
144. 766.989 39,782.740 ↓ 0.0 0 462,590

Nested Loop (cost=1.27..5.35 rows=1 width=18) (actual time=0.086..0.086 rows=0 loops=462,590)

145. 617.554 28,680.580 ↑ 1.0 1 462,590

Nested Loop (cost=0.84..4.89 rows=1 width=4) (actual time=0.062..0.062 rows=1 loops=462,590)

146. 18,041.010 18,041.010 ↑ 1.0 1 462,590

Index Scan using contractdelively_contract_id_idx on contractdelivery cdp2 (cost=0.42..2.45 rows=1 width=4) (actual time=0.038..0.039 rows=1 loops=462,590)

  • Index Cond: (contractid = cdp.contractid)
  • Filter: ((fromdate <> todate) AND (cdp.fromdate = fromdate) AND (COALESCE(cdp.todate, '2099-12-31'::date) = COALESCE(todate, '2099-12-31'::date)))
  • Rows Removed by Filter: 0
147. 10,022.016 10,022.016 ↑ 1.0 1 313,188

Index Scan using deliveryperiod_pkey on deliveryperiod per2 (cost=0.42..2.44 rows=1 width=8) (actual time=0.032..0.032 rows=1 loops=313,188)

  • Index Cond: (deliveryperiodid = cdp2.deliveryperiodid)
148. 10,335.171 10,335.171 ↓ 0.0 0 313,187

Index Scan using deliverypoint_pkey on deliverypoint dp2 (cost=0.42..0.46 rows=1 width=22) (actual time=0.033..0.033 rows=0 loops=313,187)

  • Index Cond: (deliverypointid = per2.deliverypointid)
  • Filter: ((gsrn)::text <> (dp.gsrn)::text)
  • Rows Removed by Filter: 1
149. 0.000 0.000 ↓ 0.0 0 462,590

Index Scan using town_pkey on town t_1 (cost=0.28..2.30 rows=1 width=10) (actual time=0.000..0.000 rows=0 loops=462,590)

  • Index Cond: (((country)::text = (dgoadd.towncountrycode)::text) AND ((postalcode)::text = (dgoadd.townpostalcode)::text) AND (towncode = dgoadd.towntowncode))
150. 0.000 0.000 ↓ 0.0 0

Index Scan using meter_physicalconfigid_idx on meter (cost=0.42..2.45 rows=1 width=0) (never executed)

  • Index Cond: (physicalconfigid = COALESCE(pc_dgo.physicalconfigid, pc_usr.physicalconfigid))
  • Filter: ((metertype)::text = 'BUDGET_METER'::text)
151. 147.447 147.447 ↓ 1.1 7,071 1

Index Scan using "IX_meter_metertype_meter" on meter meter_1 (cost=0.42..1,392.48 rows=6,516 width=4) (actual time=1.115..147.447 rows=7,071 loops=1)

  • Index Cond: ((metertype)::text = 'BUDGET_METER'::text)
152. 15,265.470 15,265.470 ↑ 1.0 1 462,590

Index Scan using meter_physicalconfigid_idx on meter meter_2 (cost=0.42..2.44 rows=1 width=9) (actual time=0.032..0.033 rows=1 loops=462,590)

  • Index Cond: (physicalconfigid = COALESCE(pc_dgo.physicalconfigid, pc_usr.physicalconfigid))
Planning time : 90.762 ms
Execution time : 418,431.277 ms