explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hr7N

Settings
# exclusive inclusive rows x rows loops node
1. 2,228.214 12,900.288 ↑ 1.4 100,914 1

Sort (cost=8,003,970.85..8,004,318.00 rows=138,859 width=788) (actual time=12,809.017..12,900.288 rows=100,914 loops=1)

  • Sort Key: q."Point Id", q."From date", q."To date
  • Sort Method: external merge Disk: 25,592kB
2. 57.811 10,672.074 ↑ 1.4 100,914 1

Subquery Scan on q (cost=70,683.85..7,964,446.03 rows=138,859 width=788) (actual time=1,476.554..10,672.074 rows=100,914 loops=1)

3. 25.132 10,614.263 ↑ 1.4 100,914 1

Append (cost=70,683.85..7,963,057.44 rows=138,859 width=229) (actual time=1,476.551..10,614.263 rows=100,914 loops=1)

4.          

CTE previousmet

5. 1.403 568.130 ↑ 1.0 1,848 1

HashAggregate (cost=26,269.45..26,287.94 rows=1,849 width=4) (actual time=567.776..568.130 rows=1,848 loops=1)

  • Group Key: i_3.meteringid
6. 98.149 566.727 ↓ 1.8 3,397 1

Merge Anti Join (cost=24,433.04..26,264.83 rows=1,849 width=4) (actual time=221.354..566.727 rows=3,397 loops=1)

  • Merge Cond: ((j.pointid = contractdpjournal.pointid) AND (i_3.previousindexdate = index.indexdate) AND (i_3.previousindex = index.index) AND ((i_3.timeframe)::text = (index.timeframe)::text) AND ((i_3.unit)::text = (index.unit)::text) AND ((i_3.type)::text = (index.type)::text))
7. 66.487 230.566 ↓ 2.3 63,889 1

Sort (cost=9,275.67..9,345.81 rows=28,056 width=29) (actual time=221.350..230.566 rows=63,889 loops=1)

  • Sort Key: j.pointid, i_3.previousindexdate, i_3.previousindex, i_3.timeframe, i_3.unit, i_3.type
  • Sort Method: quicksort Memory: 6,528kB
8. 38.432 164.079 ↓ 2.3 63,889 1

Hash Join (cost=2,997.49..7,202.89 rows=28,056 width=29) (actual time=33.653..164.079 rows=63,889 loops=1)

  • Hash Cond: (m_2.contractdpid = j.contractdpid)
9. 63.371 121.310 ↓ 2.3 63,889 1

Hash Join (cost=2,605.57..6,284.91 rows=28,056 width=29) (actual time=29.281..121.310 rows=63,889 loops=1)

  • Hash Cond: (i_3.meteringid = m_2.meteringid)
10. 28.687 28.687 ↓ 2.3 63,889 1

Seq Scan on index i_3 (cost=0.00..3,048.09 rows=28,056 width=25) (actual time=0.007..28.687 rows=63,889 loops=1)

  • Filter: (previousindexdate < indexdate)
  • Rows Removed by Filter: 20,278
11. 14.069 29.252 ↑ 1.0 68,114 1

Hash (cost=1,754.14..1,754.14 rows=68,114 width=8) (actual time=29.252..29.252 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 2,661kB
12. 15.183 15.183 ↑ 1.0 68,114 1

Seq Scan on metering m_2 (cost=0.00..1,754.14 rows=68,114 width=8) (actual time=0.004..15.183 rows=68,114 loops=1)

13. 2.139 4.337 ↑ 1.0 10,619 1

Hash (cost=259.19..259.19 rows=10,619 width=8) (actual time=4.337..4.337 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 415kB
14. 2.198 2.198 ↑ 1.0 10,619 1

Seq Scan on contractdpjournal j (cost=0.00..259.19 rows=10,619 width=8) (actual time=0.004..2.198 rows=10,619 loops=1)

15. 73.052 238.012 ↓ 1.0 76,642 1

Sort (cost=15,157.37..15,348.92 rows=76,617 width=25) (actual time=227.457..238.012 rows=76,642 loops=1)

  • Sort Key: contractdpjournal.pointid, index.indexdate, index.index, index.timeframe, index.unit, index.type
  • Sort Method: quicksort Memory: 9,020kB
16. 42.338 164.960 ↓ 1.0 76,650 1

Hash Join (cost=393.20..8,941.68 rows=76,617 width=25) (actual time=3.967..164.960 rows=76,650 loops=1)

  • Hash Cond: (metering.contractdpid = contractdpjournal.contractdpid)
17. 47.603 118.714 ↓ 1.0 76,650 1

Merge Join (cost=1.27..7,113.18 rows=76,617 width=25) (actual time=0.047..118.714 rows=76,650 loops=1)

  • Merge Cond: (metering.meteringid = index.meteringid)
18. 28.120 28.120 ↑ 1.0 68,114 1

Index Scan using idx_metering_contractdpid on metering (cost=0.29..2,284.00 rows=68,114 width=8) (actual time=0.019..28.120 rows=68,114 loops=1)

19. 42.991 42.991 ↓ 1.0 76,650 1

Index Scan using idx_index_meteringid on index (cost=0.29..3,701.22 rows=76,617 width=25) (actual time=0.015..42.991 rows=76,650 loops=1)

  • Filter: ((status)::text = 'A'::text)
  • Rows Removed by Filter: 7,517
20. 1.798 3.908 ↑ 1.0 10,619 1

Hash (cost=259.19..259.19 rows=10,619 width=8) (actual time=3.908..3.908 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 415kB
21. 2.110 2.110 ↑ 1.0 10,619 1

Seq Scan on contractdpjournal (cost=0.00..259.19 rows=10,619 width=8) (actual time=0.006..2.110 rows=10,619 loops=1)

22. 1,298.970 9,147.424 ↓ 1.0 84,173 1

Nested Loop Left Join (cost=44,395.91..6,779,774.78 rows=84,167 width=244) (actual time=1,476.550..9,147.424 rows=84,173 loops=1)

  • Join Filter: (i.previousindexdate = i.indexdate)
  • Rows Removed by Join Filter: 790
23. 2,855.627 6,860.249 ↑ 1.0 84,167 1

Nested Loop Left Join (cost=44,395.61..2,040,317.64 rows=84,167 width=248) (actual time=864.965..6,860.249 rows=84,167 loops=1)

  • Join Filter: (dpc.dpconfigjid IS NULL)
  • Rows Removed by Join Filter: 84,155
24. 2,523.909 3,836.288 ↑ 1.0 84,167 1

Nested Loop Left Join (cost=44,380.08..726,987.53 rows=84,167 width=250) (actual time=864.870..3,836.288 rows=84,167 loops=1)

25. 172.793 1,059.878 ↑ 1.0 84,167 1

Hash Join (cost=44,372.10..49,103.52 rows=84,167 width=244) (actual time=864.760..1,059.878 rows=84,167 loops=1)

  • Hash Cond: (i.meteringid = m.meteringid)
26. 22.353 22.353 ↑ 1.0 84,167 1

Seq Scan on index i (cost=0.00..2,837.67 rows=84,167 width=71) (actual time=0.005..22.353 rows=84,167 loops=1)

27. 46.049 864.732 ↑ 1.0 68,114 1

Hash (cost=43,520.67..43,520.67 rows=68,114 width=177) (actual time=864.732..864.732 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 11,385kB
28. 56.275 818.683 ↑ 1.0 68,114 1

Hash Left Join (cost=13,463.82..43,520.67 rows=68,114 width=177) (actual time=216.621..818.683 rows=68,114 loops=1)

  • Hash Cond: (t.envid = msg.envid)
29. 61.525 632.380 ↑ 1.0 68,114 1

Hash Join (cost=4,283.67..32,979.26 rows=68,114 width=164) (actual time=86.524..632.380 rows=68,114 loops=1)

  • Hash Cond: (m.contractdpid = cdp.contractdpid)
30. 384.328 526.571 ↑ 1.0 68,114 1

Hash Right Join (cost=2,605.57..30,024.02 rows=68,114 width=57) (actual time=42.230..526.571 rows=68,114 loops=1)

  • Hash Cond: (t.msgid = m.txref)
31. 101.027 101.027 ↑ 1.0 564,873 1

Seq Scan on transaction t (cost=0.00..19,731.73 rows=564,873 width=47) (actual time=0.005..101.027 rows=564,873 loops=1)

32. 18.364 41.216 ↑ 1.0 68,114 1

Hash (cost=1,754.14..1,754.14 rows=68,114 width=18) (actual time=41.216..41.216 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 3,438kB
33. 22.852 22.852 ↑ 1.0 68,114 1

Seq Scan on metering m (cost=0.00..1,754.14 rows=68,114 width=18) (actual time=0.006..22.852 rows=68,114 loops=1)

34. 5.436 44.284 ↑ 1.0 10,619 1

Hash (cost=1,545.37..1,545.37 rows=10,619 width=111) (actual time=44.284..44.284 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 1,036kB
35. 5.061 38.848 ↑ 1.0 10,619 1

Hash Left Join (cost=411.74..1,545.37 rows=10,619 width=111) (actual time=4.798..38.848 rows=10,619 loops=1)

  • Hash Cond: (contract.supplierid = s.supplierid)
36. 7.916 33.783 ↑ 1.0 10,619 1

Hash Join (cost=410.70..1,398.31 rows=10,619 width=83) (actual time=4.788..33.783 rows=10,619 loops=1)

  • Hash Cond: (cdp.contractid = contract.contractid)
37. 7.525 21.112 ↑ 1.0 10,619 1

Merge Join (cost=0.61..789.12 rows=10,619 width=79) (actual time=0.024..21.112 rows=10,619 loops=1)

  • Merge Cond: (dp.pointid = cdp.pointid)
38. 5.490 5.490 ↑ 1.0 8,487 1

Index Scan using deliverypoint_pkey on deliverypoint dp (cost=0.29..290.59 rows=8,487 width=27) (actual time=0.009..5.490 rows=8,487 loops=1)

39. 8.097 8.097 ↑ 1.0 10,619 1

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal cdp (cost=0.29..344.57 rows=10,619 width=52) (actual time=0.009..8.097 rows=10,619 loops=1)

40. 2.186 4.755 ↑ 1.0 10,404 1

Hash (cost=280.04..280.04 rows=10,404 width=8) (actual time=4.755..4.755 rows=10,404 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 407kB
41. 2.569 2.569 ↑ 1.0 10,404 1

Seq Scan on contract (cost=0.00..280.04 rows=10,404 width=8) (actual time=0.005..2.569 rows=10,404 loops=1)

42. 0.002 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=36) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
43. 0.002 0.002 ↑ 1.0 2 1

Seq Scan on supplier s (cost=0.00..1.02 rows=2 width=36) (actual time=0.002..0.002 rows=2 loops=1)

44. 54.657 130.028 ↑ 1.0 194,940 1

Hash (cost=6,743.40..6,743.40 rows=194,940 width=21) (actual time=130.028..130.028 rows=194,940 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 10,849kB
45. 75.371 75.371 ↑ 1.0 194,940 1

Seq Scan on msgenv msg (cost=0.00..6,743.40 rows=194,940 width=21) (actual time=0.005..75.371 rows=194,940 loops=1)

46. 0.000 252.501 ↑ 1.0 1 84,167

Index Scan using dpj_un on dpconfigjournal dpc (cost=7.98..8.04 rows=1 width=6) (actual time=0.002..0.003 rows=1 loops=84,167)

  • Index Cond: (dpconfigjid = (SubPlan 11))
47.          

SubPlan (for Index Scan)

48. 0.000 2,356.676 ↑ 1.0 1 84,167

Limit (cost=7.69..7.70 rows=1 width=26) (actual time=0.028..0.028 rows=1 loops=84,167)

49. 420.835 2,356.676 ↑ 1.0 1 84,167

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.028..0.028 rows=1 loops=84,167)

  • Sort Key: ((tx_2.msgdate)::date), ((j_3.creationdate)::date), j_3.fromdate, j_3.powerlimiter, m_5.budgetmeter
  • Sort Method: top-N heapsort Memory: 25kB
50. 152.950 1,935.841 ↓ 2.0 2 84,167

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.012..0.023 rows=2 loops=84,167)

51. 63.655 1,262.505 ↓ 2.0 2 84,167

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.008..0.015 rows=2 loops=84,167)

52. 505.002 505.002 ↓ 2.0 2 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_3 (cost=0.29..2.91 rows=1 width=25) (actual time=0.004..0.006 rows=2 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: ((fromdate <= i.indexdate) AND ((source)::text = 'DGO'::text))
  • Rows Removed by Filter: 1
53. 693.848 693.848 ↑ 1.0 1 173,462

Index Scan using idx_transaction_msgid_pk on transaction tx_2 (cost=0.42..2.44 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=173,462)

  • Index Cond: (msgid = j_3.txref)
54. 520.386 520.386 ↑ 1.0 1 173,462

Index Scan using idx_meter_physicalconfigid_pk on meter m_5 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.003 rows=1 loops=173,462)

  • Index Cond: (j_3.physicalconfigid = physicalconfigid)
55. 0.000 2,356.676 ↑ 1.0 1 84,167

Limit (cost=7.69..7.70 rows=1 width=26) (actual time=0.028..0.028 rows=1 loops=84,167)

56. 420.835 2,356.676 ↑ 1.0 1 84,167

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.028..0.028 rows=1 loops=84,167)

  • Sort Key: ((tx_2.msgdate)::date), ((j_3.creationdate)::date), j_3.fromdate, j_3.powerlimiter, m_5.budgetmeter
  • Sort Method: top-N heapsort Memory: 25kB
57. 152.950 1,935.841 ↓ 2.0 2 84,167

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.012..0.023 rows=2 loops=84,167)

58. 63.655 1,262.505 ↓ 2.0 2 84,167

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.008..0.015 rows=2 loops=84,167)

59. 505.002 505.002 ↓ 2.0 2 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_3 (cost=0.29..2.91 rows=1 width=25) (actual time=0.004..0.006 rows=2 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: ((fromdate <= i.indexdate) AND ((source)::text = 'DGO'::text))
  • Rows Removed by Filter: 1
60. 693.848 693.848 ↑ 1.0 1 173,462

Index Scan using idx_transaction_msgid_pk on transaction tx_2 (cost=0.42..2.44 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=173,462)

  • Index Cond: (msgid = j_3.txref)
61. 520.386 520.386 ↑ 1.0 1 173,462

Index Scan using idx_meter_physicalconfigid_pk on meter m_5 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.003 rows=1 loops=173,462)

  • Index Cond: (j_3.physicalconfigid = physicalconfigid)
62. 0.000 168.334 ↑ 1.0 1 84,167

Index Scan using dpj_un on dpconfigjournal dpc2 (cost=15.53..15.59 rows=1 width=6) (actual time=0.002..0.002 rows=1 loops=84,167)

  • Index Cond: (dpconfigjid = (SubPlan 13))
63.          

SubPlan (for Index Scan)

64. 0.000 2,693.344 ↑ 1.0 1 84,167

Limit (cost=15.24..15.25 rows=1 width=26) (actual time=0.031..0.032 rows=1 loops=84,167)

65.          

Initplan (for Limit)

66. 168.334 1,178.338 ↑ 1.0 1 84,167

Aggregate (cost=7.54..7.55 rows=1 width=4) (actual time=0.014..0.014 rows=1 loops=84,167)

67. 197.398 1,010.004 ↓ 1.5 3 84,167

Nested Loop Left Join (cost=0.57..7.53 rows=2 width=4) (actual time=0.005..0.012 rows=3 loops=84,167)

68. 336.668 336.668 ↓ 1.5 3 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j1_1 (cost=0.29..2.91 rows=2 width=12) (actual time=0.002..0.004 rows=3 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: ((source)::text = 'DGO'::text)
69. 475.938 475.938 ↑ 1.0 1 237,969

Index Only Scan using idx_meter_physicalconfigid_pk on meter m1_1 (cost=0.29..2.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=237,969)

  • Index Cond: (physicalconfigid = j1_1.physicalconfigid)
  • Heap Fetches: 265,022
70. 252.501 2,609.177 ↑ 1.0 1 84,167

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.031..0.031 rows=1 loops=84,167)

  • Sort Key: ((tx_3.msgdate)::date), ((j_4.creationdate)::date), j_4.powerlimiter, m_6.budgetmeter
  • Sort Method: quicksort Memory: 25kB
71. 218.565 2,356.676 ↑ 1.0 1 84,167

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.024..0.028 rows=1 loops=84,167)

72. 33.263 1,935.841 ↑ 1.0 1 84,167

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.020..0.023 rows=1 loops=84,167)

73. 1,599.173 1,599.173 ↑ 1.0 1 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_4 (cost=0.29..2.91 rows=1 width=25) (actual time=0.017..0.019 rows=1 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: (((source)::text = 'DGO'::text) AND (fromdate = $36))
  • Rows Removed by Filter: 2
74. 303.405 303.405 ↑ 1.0 1 101,135

Index Scan using idx_transaction_msgid_pk on transaction tx_3 (cost=0.42..2.44 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=101,135)

  • Index Cond: (msgid = j_4.txref)
75. 202.270 202.270 ↑ 1.0 1 101,135

Index Scan using idx_meter_physicalconfigid_pk on meter m_6 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=101,135)

  • Index Cond: (j_4.physicalconfigid = physicalconfigid)
76. 0.000 2,693.344 ↑ 1.0 1 84,167

Limit (cost=15.24..15.25 rows=1 width=26) (actual time=0.031..0.032 rows=1 loops=84,167)

77.          

Initplan (for Limit)

78. 168.334 1,178.338 ↑ 1.0 1 84,167

Aggregate (cost=7.54..7.55 rows=1 width=4) (actual time=0.014..0.014 rows=1 loops=84,167)

79. 197.398 1,010.004 ↓ 1.5 3 84,167

Nested Loop Left Join (cost=0.57..7.53 rows=2 width=4) (actual time=0.005..0.012 rows=3 loops=84,167)

80. 336.668 336.668 ↓ 1.5 3 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j1_1 (cost=0.29..2.91 rows=2 width=12) (actual time=0.002..0.004 rows=3 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: ((source)::text = 'DGO'::text)
81. 475.938 475.938 ↑ 1.0 1 237,969

Index Only Scan using idx_meter_physicalconfigid_pk on meter m1_1 (cost=0.29..2.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=237,969)

  • Index Cond: (physicalconfigid = j1_1.physicalconfigid)
  • Heap Fetches: 265,022
82. 252.501 2,609.177 ↑ 1.0 1 84,167

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.031..0.031 rows=1 loops=84,167)

  • Sort Key: ((tx_3.msgdate)::date), ((j_4.creationdate)::date), j_4.powerlimiter, m_6.budgetmeter
  • Sort Method: quicksort Memory: 25kB
83. 218.565 2,356.676 ↑ 1.0 1 84,167

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.024..0.028 rows=1 loops=84,167)

84. 33.263 1,935.841 ↑ 1.0 1 84,167

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.020..0.023 rows=1 loops=84,167)

85. 1,599.173 1,599.173 ↑ 1.0 1 84,167

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_4 (cost=0.29..2.91 rows=1 width=25) (actual time=0.017..0.019 rows=1 loops=84,167)

  • Index Cond: (pointid = dp.pointid)
  • Filter: (((source)::text = 'DGO'::text) AND (fromdate = $36))
  • Rows Removed by Filter: 2
86. 303.405 303.405 ↑ 1.0 1 101,135

Index Scan using idx_transaction_msgid_pk on transaction tx_3 (cost=0.42..2.44 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=101,135)

  • Index Cond: (msgid = j_4.txref)
87. 202.270 202.270 ↑ 1.0 1 101,135

Index Scan using idx_meter_physicalconfigid_pk on meter m_6 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=101,135)

  • Index Cond: (j_4.physicalconfigid = physicalconfigid)
88. 336.668 336.668 ↓ 0.0 0 84,167

Index Scan using idx_index_meteringid on index i2 (cost=0.29..0.37 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=84,167)

  • Index Cond: (i.meteringid = meteringid)
  • Filter: ((i.meterid <> meterid) AND ((i.timeframe)::text = (timeframe)::text) AND ((i.unit)::text = (unit)::text) AND ((i.type)::text = (type)::text))
  • Rows Removed by Filter: 2
89.          

SubPlan (for Nested Loop Left Join)

90. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=50.07..53.70 rows=1 width=0) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=49.78..52.54 rows=3 width=8) (never executed)

  • Hash Cond: (previousmet_1.meteringid = m3.meteringid)
92. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=41.60..43.60 rows=200 width=4) (never executed)

  • Group Key: previousmet_1.meteringid
93. 0.000 0.000 ↓ 0.0 0

CTE Scan on previousmet previousmet_1 (cost=0.00..36.98 rows=1,849 width=4) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.10..8.10 rows=6 width=4) (never executed)

95. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.58..8.10 rows=6 width=4) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal j3 (cost=0.29..2.30 rows=1 width=4) (never executed)

  • Index Cond: (pointid = cdp.pointid)
97. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_metering_contractdpid_2 on metering m3 (cost=0.29..5.73 rows=7 width=8) (never executed)

  • Index Cond: (contractdpid = j3.contractdpid)
98. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_index_meteringid on index i3 (cost=0.29..0.38 rows=1 width=4) (never executed)

  • Index Cond: (meteringid = m3.meteringid)
  • Filter: ((previousindexdate = i.indexdate) AND ((status)::text = 'A'::text))
99. 1.494 610.146 ↑ 13.4 2,863 1

Hash Join (cost=3,039.39..4,857.13 rows=38,308 width=8) (actual time=598.658..610.146 rows=2,863 loops=1)

  • Hash Cond: (m3_1.contractdpid = j3_1.contractdpid)
100. 2.176 604.153 ↑ 13.4 2,863 1

Hash Join (cost=2,647.46..3,746.93 rows=38,308 width=8) (actual time=594.146..604.153 rows=2,863 loops=1)

  • Hash Cond: (i3_1.meteringid = m3_1.meteringid)
101. 1.949 577.045 ↑ 13.4 2,863 1

Nested Loop (cost=41.90..279.43 rows=38,308 width=12) (actual time=569.168..577.045 rows=2,863 loops=1)

102. 0.942 569.552 ↓ 9.2 1,848 1

HashAggregate (cost=41.60..43.60 rows=200 width=4) (actual time=569.138..569.552 rows=1,848 loops=1)

  • Group Key: previousmet_2.meteringid
103. 568.610 568.610 ↑ 1.0 1,848 1

CTE Scan on previousmet previousmet_2 (cost=0.00..36.98 rows=1,849 width=4) (actual time=567.781..568.610 rows=1,848 loops=1)

104. 5.544 5.544 ↑ 1.0 2 1,848

Index Scan using idx_index_meteringid on index i3_1 (cost=0.29..1.16 rows=2 width=8) (actual time=0.003..0.003 rows=2 loops=1,848)

  • Index Cond: (meteringid = previousmet_2.meteringid)
  • Filter: ((status)::text = 'A'::text)
  • Rows Removed by Filter: 1
105. 11.902 24.932 ↑ 1.0 68,114 1

Hash (cost=1,754.14..1,754.14 rows=68,114 width=8) (actual time=24.932..24.932 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 2,661kB
106. 13.030 13.030 ↑ 1.0 68,114 1

Seq Scan on metering m3_1 (cost=0.00..1,754.14 rows=68,114 width=8) (actual time=0.006..13.030 rows=68,114 loops=1)

107. 2.139 4.499 ↑ 1.0 10,619 1

Hash (cost=259.19..259.19 rows=10,619 width=8) (actual time=4.499..4.499 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 415kB
108. 2.360 2.360 ↑ 1.0 10,619 1

Seq Scan on contractdpjournal j3_1 (cost=0.00..259.19 rows=10,619 width=8) (actual time=0.006..2.360 rows=10,619 loops=1)

109. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..8.64 rows=6 width=0) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal cdp_5 (cost=0.29..2.30 rows=1 width=4) (never executed)

  • Index Cond: (pointid = dp.pointid)
111. 0.000 0.000 ↓ 0.0 0

Index Only Scan using process_idx4test on process p_2 (cost=0.29..6.27 rows=7 width=4) (never executed)

  • Index Cond: (contractdpid = cdp_5.contractdpid)
  • Heap Fetches: 0
112. 28.506 41.391 ↑ 1.0 61,691 1

Hash Join (cost=391.93..3,204.54 rows=61,691 width=4) (actual time=3.919..41.391 rows=61,691 loops=1)

  • Hash Cond: (p_3.contractdpid = cdp_6.contractdpid)
113. 8.982 8.982 ↑ 1.0 61,691 1

Seq Scan on process p_3 (cost=0.00..1,655.91 rows=61,691 width=4) (actual time=0.004..8.982 rows=61,691 loops=1)

114. 1.858 3.903 ↑ 1.0 10,619 1

Hash (cost=259.19..259.19 rows=10,619 width=8) (actual time=3.903..3.903 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 415kB
115. 2.045 2.045 ↑ 1.0 10,619 1

Seq Scan on contractdpjournal cdp_6 (cost=0.00..259.19 rows=10,619 width=8) (actual time=0.004..2.045 rows=10,619 loops=1)

116. 2.176 1,317.107 ↑ 10.6 3,973 1

Subquery Scan on *SELECT* 2 (cost=44,442.01..1,152,825.30 rows=41,988 width=236) (actual time=721.429..1,317.107 rows=3,973 loops=1)

117. 83.882 1,314.931 ↑ 10.6 3,973 1

Nested Loop Left Join (cost=44,442.01..1,152,405.42 rows=41,988 width=236) (actual time=721.426..1,314.931 rows=3,973 loops=1)

  • Join Filter: (i_1.previousindexdate = i_1.indexdate)
  • Rows Removed by Join Filter: 50
118. 150.014 1,172.659 ↑ 10.6 3,973 1

Nested Loop Left Join (cost=44,441.72..1,042,810.43 rows=41,988 width=244) (actual time=721.317..1,172.659 rows=3,973 loops=1)

  • Join Filter: (dpc_1.dpconfigjid IS NULL)
  • Rows Removed by Join Filter: 3,967
119. 129.163 1,010.726 ↑ 10.6 3,973 1

Nested Loop Left Join (cost=44,426.18..387,635.55 rows=41,988 width=246) (actual time=721.246..1,010.726 rows=3,973 loops=1)

120. 17.756 869.644 ↑ 10.6 3,973 1

Hash Join (cost=44,418.20..49,462.71 rows=41,988 width=240) (actual time=721.163..869.644 rows=3,973 loops=1)

  • Hash Cond: (m_1.meteringid = previousmet.meteringid)
121. 104.928 850.563 ↓ 1.0 84,080 1

Hash Join (cost=44,372.10..49,099.22 rows=83,976 width=244) (actual time=719.821..850.563 rows=84,080 loops=1)

  • Hash Cond: (i_1.meteringid = m_1.meteringid)
122. 25.850 25.850 ↓ 1.0 84,080 1

Seq Scan on index i_1 (cost=0.00..2,837.67 rows=83,976 width=71) (actual time=0.006..25.850 rows=84,080 loops=1)

  • Filter: ((previousindexdate IS NOT NULL) AND (previousindex IS NOT NULL))
  • Rows Removed by Filter: 87
123. 40.757 719.785 ↑ 1.0 68,114 1

Hash (cost=43,520.67..43,520.67 rows=68,114 width=173) (actual time=719.785..719.785 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 11,168kB
124. 51.255 679.028 ↑ 1.0 68,114 1

Hash Left Join (cost=13,463.82..43,520.67 rows=68,114 width=173) (actual time=181.953..679.028 rows=68,114 loops=1)

  • Hash Cond: (t_1.envid = msg_1.envid)
125. 52.965 520.587 ↑ 1.0 68,114 1

Hash Join (cost=4,283.67..32,979.26 rows=68,114 width=160) (actual time=74.711..520.587 rows=68,114 loops=1)

  • Hash Cond: (m_1.contractdpid = cdp_1.contractdpid)
126. 302.167 427.307 ↑ 1.0 68,114 1

Hash Right Join (cost=2,605.57..30,024.02 rows=68,114 width=57) (actual time=34.387..427.307 rows=68,114 loops=1)

  • Hash Cond: (t_1.msgid = m_1.txref)
127. 91.614 91.614 ↑ 1.0 564,873 1

Seq Scan on transaction t_1 (cost=0.00..19,731.73 rows=564,873 width=47) (actual time=0.005..91.614 rows=564,873 loops=1)

128. 14.818 33.526 ↑ 1.0 68,114 1

Hash (cost=1,754.14..1,754.14 rows=68,114 width=18) (actual time=33.526..33.526 rows=68,114 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 3,438kB
129. 18.708 18.708 ↑ 1.0 68,114 1

Seq Scan on metering m_1 (cost=0.00..1,754.14 rows=68,114 width=18) (actual time=0.007..18.708 rows=68,114 loops=1)

130. 5.005 40.315 ↑ 1.0 10,619 1

Hash (cost=1,545.37..1,545.37 rows=10,619 width=107) (actual time=40.315..40.315 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 994kB
131. 4.419 35.310 ↑ 1.0 10,619 1

Hash Left Join (cost=411.74..1,545.37 rows=10,619 width=107) (actual time=4.022..35.310 rows=10,619 loops=1)

  • Hash Cond: (contract_1.supplierid = s_1.supplierid)
132. 6.904 30.886 ↑ 1.0 10,619 1

Hash Join (cost=410.70..1,398.31 rows=10,619 width=79) (actual time=4.010..30.886 rows=10,619 loops=1)

  • Hash Cond: (cdp_1.contractid = contract_1.contractid)
133. 7.032 20.010 ↑ 1.0 10,619 1

Merge Join (cost=0.61..789.12 rows=10,619 width=75) (actual time=0.029..20.010 rows=10,619 loops=1)

  • Merge Cond: (dp_1.pointid = cdp_1.pointid)
134. 5.124 5.124 ↑ 1.0 8,487 1

Index Scan using deliverypoint_pkey on deliverypoint dp_1 (cost=0.29..290.59 rows=8,487 width=27) (actual time=0.010..5.124 rows=8,487 loops=1)

135. 7.854 7.854 ↑ 1.0 10,619 1

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal cdp_1 (cost=0.29..344.57 rows=10,619 width=52) (actual time=0.010..7.854 rows=10,619 loops=1)

136. 1.833 3.972 ↑ 1.0 10,404 1

Hash (cost=280.04..280.04 rows=10,404 width=8) (actual time=3.972..3.972 rows=10,404 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 407kB
137. 2.139 2.139 ↑ 1.0 10,404 1

Seq Scan on contract contract_1 (cost=0.00..280.04 rows=10,404 width=8) (actual time=0.006..2.139 rows=10,404 loops=1)

138. 0.002 0.005 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=36) (actual time=0.005..0.005 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
139. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on supplier s_1 (cost=0.00..1.02 rows=2 width=36) (actual time=0.002..0.003 rows=2 loops=1)

140. 44.640 107.186 ↑ 1.0 194,940 1

Hash (cost=6,743.40..6,743.40 rows=194,940 width=21) (actual time=107.186..107.186 rows=194,940 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 10,849kB
141. 62.546 62.546 ↑ 1.0 194,940 1

Seq Scan on msgenv msg_1 (cost=0.00..6,743.40 rows=194,940 width=21) (actual time=0.006..62.546 rows=194,940 loops=1)

142. 0.322 1.325 ↓ 9.2 1,848 1

Hash (cost=43.60..43.60 rows=200 width=4) (actual time=1.325..1.325 rows=1,848 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 65kB
143. 0.790 1.003 ↓ 9.2 1,848 1

HashAggregate (cost=41.60..43.60 rows=200 width=4) (actual time=0.772..1.003 rows=1,848 loops=1)

  • Group Key: previousmet.meteringid
144. 0.213 0.213 ↑ 1.0 1,848 1

CTE Scan on previousmet (cost=0.00..36.98 rows=1,849 width=4) (actual time=0.001..0.213 rows=1,848 loops=1)

145. 0.000 11.919 ↑ 1.0 1 3,973

Index Scan using dpj_un on dpconfigjournal dpc_1 (cost=7.98..8.04 rows=1 width=6) (actual time=0.003..0.003 rows=1 loops=3,973)

  • Index Cond: (dpconfigjid = (SubPlan 4))
146.          

SubPlan (for Index Scan)

147. 3.973 123.163 ↑ 1.0 1 3,973

Limit (cost=7.69..7.70 rows=1 width=26) (actual time=0.030..0.031 rows=1 loops=3,973)

148. 19.865 119.190 ↑ 1.0 1 3,973

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.030..0.030 rows=1 loops=3,973)

  • Sort Key: ((tx.msgdate)::date), ((j_1.creationdate)::date), j_1.fromdate, j_1.powerlimiter, m_3.budgetmeter
  • Sort Method: top-N heapsort Memory: 25kB
149. 9.540 99.325 ↓ 2.0 2 3,973

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.013..0.025 rows=2 loops=3,973)

150. 4.774 63.568 ↓ 2.0 2 3,973

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.008..0.016 rows=2 loops=3,973)

151. 23.838 23.838 ↓ 2.0 2 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_1 (cost=0.29..2.91 rows=1 width=25) (actual time=0.004..0.006 rows=2 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: ((fromdate <= i_1.indexdate) AND ((source)::text = 'DGO'::text))
  • Rows Removed by Filter: 2
152. 34.956 34.956 ↑ 1.0 1 8,739

Index Scan using idx_transaction_msgid_pk on transaction tx (cost=0.42..2.44 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=8,739)

  • Index Cond: (msgid = j_1.txref)
153. 26.217 26.217 ↑ 1.0 1 8,739

Index Scan using idx_meter_physicalconfigid_pk on meter m_3 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.003 rows=1 loops=8,739)

  • Index Cond: (j_1.physicalconfigid = physicalconfigid)
154. 3.973 123.163 ↑ 1.0 1 3,973

Limit (cost=7.69..7.70 rows=1 width=26) (actual time=0.030..0.031 rows=1 loops=3,973)

155. 19.865 119.190 ↑ 1.0 1 3,973

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.030..0.030 rows=1 loops=3,973)

  • Sort Key: ((tx.msgdate)::date), ((j_1.creationdate)::date), j_1.fromdate, j_1.powerlimiter, m_3.budgetmeter
  • Sort Method: top-N heapsort Memory: 25kB
156. 9.540 99.325 ↓ 2.0 2 3,973

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.013..0.025 rows=2 loops=3,973)

157. 4.774 63.568 ↓ 2.0 2 3,973

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.008..0.016 rows=2 loops=3,973)

158. 23.838 23.838 ↓ 2.0 2 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_1 (cost=0.29..2.91 rows=1 width=25) (actual time=0.004..0.006 rows=2 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: ((fromdate <= i_1.indexdate) AND ((source)::text = 'DGO'::text))
  • Rows Removed by Filter: 2
159. 34.956 34.956 ↑ 1.0 1 8,739

Index Scan using idx_transaction_msgid_pk on transaction tx (cost=0.42..2.44 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=8,739)

  • Index Cond: (msgid = j_1.txref)
160. 26.217 26.217 ↑ 1.0 1 8,739

Index Scan using idx_meter_physicalconfigid_pk on meter m_3 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.003 rows=1 loops=8,739)

  • Index Cond: (j_1.physicalconfigid = physicalconfigid)
161. 0.000 11.919 ↑ 1.0 1 3,973

Index Scan using dpj_un on dpconfigjournal dpc2_1 (cost=15.53..15.59 rows=1 width=6) (actual time=0.002..0.003 rows=1 loops=3,973)

  • Index Cond: (dpconfigjid = (SubPlan 6))
162.          

SubPlan (for Index Scan)

163. 0.000 143.028 ↑ 1.0 1 3,973

Limit (cost=15.24..15.25 rows=1 width=26) (actual time=0.036..0.036 rows=1 loops=3,973)

164.          

Initplan (for Limit)

165. 3.973 67.541 ↑ 1.0 1 3,973

Aggregate (cost=7.54..7.55 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=3,973)

166. 12.957 63.568 ↓ 2.0 4 3,973

Nested Loop Left Join (cost=0.57..7.53 rows=2 width=4) (actual time=0.005..0.016 rows=4 loops=3,973)

167. 19.865 19.865 ↓ 2.0 4 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j1 (cost=0.29..2.91 rows=2 width=12) (actual time=0.002..0.005 rows=4 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: ((source)::text = 'DGO'::text)
168. 30.746 30.746 ↑ 1.0 1 15,373

Index Only Scan using idx_meter_physicalconfigid_pk on meter m1 (cost=0.29..2.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=15,373)

  • Index Cond: (physicalconfigid = j1.physicalconfigid)
  • Heap Fetches: 17,093
169. 15.892 143.028 ↑ 1.0 1 3,973

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.036..0.036 rows=1 loops=3,973)

  • Sort Key: ((tx_1.msgdate)::date), ((j_2.creationdate)::date), j_2.powerlimiter, m_4.budgetmeter
  • Sort Method: quicksort Memory: 25kB
170. 6.108 127.136 ↑ 1.0 1 3,973

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.028..0.032 rows=1 loops=3,973)

171. 5.189 111.244 ↑ 1.0 1 3,973

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.024..0.028 rows=1 loops=3,973)

172. 91.379 91.379 ↑ 1.0 1 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_2 (cost=0.29..2.91 rows=1 width=25) (actual time=0.021..0.023 rows=1 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: (((source)::text = 'DGO'::text) AND (fromdate = $10))
  • Rows Removed by Filter: 3
173. 14.676 14.676 ↑ 1.0 1 4,892

Index Scan using idx_transaction_msgid_pk on transaction tx_1 (cost=0.42..2.44 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=4,892)

  • Index Cond: (msgid = j_2.txref)
174. 9.784 9.784 ↑ 1.0 1 4,892

Index Scan using idx_meter_physicalconfigid_pk on meter m_4 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=4,892)

  • Index Cond: (j_2.physicalconfigid = physicalconfigid)
175. 0.000 143.028 ↑ 1.0 1 3,973

Limit (cost=15.24..15.25 rows=1 width=26) (actual time=0.036..0.036 rows=1 loops=3,973)

176.          

Initplan (for Limit)

177. 3.973 67.541 ↑ 1.0 1 3,973

Aggregate (cost=7.54..7.55 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=3,973)

178. 12.957 63.568 ↓ 2.0 4 3,973

Nested Loop Left Join (cost=0.57..7.53 rows=2 width=4) (actual time=0.005..0.016 rows=4 loops=3,973)

179. 19.865 19.865 ↓ 2.0 4 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j1 (cost=0.29..2.91 rows=2 width=12) (actual time=0.002..0.005 rows=4 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: ((source)::text = 'DGO'::text)
180. 30.746 30.746 ↑ 1.0 1 15,373

Index Only Scan using idx_meter_physicalconfigid_pk on meter m1 (cost=0.29..2.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=15,373)

  • Index Cond: (physicalconfigid = j1.physicalconfigid)
  • Heap Fetches: 17,093
181. 15.892 143.028 ↑ 1.0 1 3,973

Sort (cost=7.69..7.70 rows=1 width=26) (actual time=0.036..0.036 rows=1 loops=3,973)

  • Sort Key: ((tx_1.msgdate)::date), ((j_2.creationdate)::date), j_2.powerlimiter, m_4.budgetmeter
  • Sort Method: quicksort Memory: 25kB
182. 6.108 127.136 ↑ 1.0 1 3,973

Nested Loop Left Join (cost=0.99..7.68 rows=1 width=26) (actual time=0.028..0.032 rows=1 loops=3,973)

183. 5.189 111.244 ↑ 1.0 1 3,973

Nested Loop Left Join (cost=0.71..5.37 rows=1 width=29) (actual time=0.024..0.028 rows=1 loops=3,973)

184. 91.379 91.379 ↑ 1.0 1 3,973

Index Scan using idx_dpconfigjournal_pointid_pk on dpconfigjournal j_2 (cost=0.29..2.91 rows=1 width=25) (actual time=0.021..0.023 rows=1 loops=3,973)

  • Index Cond: (pointid = dp_1.pointid)
  • Filter: (((source)::text = 'DGO'::text) AND (fromdate = $10))
  • Rows Removed by Filter: 3
185. 14.676 14.676 ↑ 1.0 1 4,892

Index Scan using idx_transaction_msgid_pk on transaction tx_1 (cost=0.42..2.44 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=4,892)

  • Index Cond: (msgid = j_2.txref)
186. 9.784 9.784 ↑ 1.0 1 4,892

Index Scan using idx_meter_physicalconfigid_pk on meter m_4 (cost=0.29..2.30 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=4,892)

  • Index Cond: (j_2.physicalconfigid = physicalconfigid)
187. 15.892 15.892 ↓ 0.0 0 3,973

Index Scan using idx_index_meteringid on index i2_1 (cost=0.29..0.37 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=3,973)

  • Index Cond: (i_1.meteringid = meteringid)
  • Filter: ((i_1.meterid <> meterid) AND ((i_1.timeframe)::text = (timeframe)::text) AND ((i_1.unit)::text = (unit)::text) AND ((i_1.type)::text = (type)::text))
  • Rows Removed by Filter: 3
188.          

SubPlan (for Nested Loop Left Join)

189. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..8.64 rows=6 width=0) (never executed)

190. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal cdp_3 (cost=0.29..2.30 rows=1 width=4) (never executed)

  • Index Cond: (pointid = dp_1.pointid)
191. 0.000 0.000 ↓ 0.0 0

Index Only Scan using process_idx4test on process p (cost=0.29..6.27 rows=7 width=4) (never executed)

  • Index Cond: (contractdpid = cdp_3.contractdpid)
  • Heap Fetches: 0
192. 29.381 42.498 ↑ 1.0 61,691 1

Hash Join (cost=391.93..3,204.54 rows=61,691 width=4) (actual time=4.195..42.498 rows=61,691 loops=1)

  • Hash Cond: (p_1.contractdpid = cdp_4.contractdpid)
193. 8.948 8.948 ↑ 1.0 61,691 1

Seq Scan on process p_1 (cost=0.00..1,655.91 rows=61,691 width=4) (actual time=0.004..8.948 rows=61,691 loops=1)

194. 1.953 4.169 ↑ 1.0 10,619 1

Hash (cost=259.19..259.19 rows=10,619 width=8) (actual time=4.169..4.169 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 415kB
195. 2.216 2.216 ↑ 1.0 10,619 1

Seq Scan on contractdpjournal cdp_4 (cost=0.00..259.19 rows=10,619 width=8) (actual time=0.005..2.216 rows=10,619 loops=1)

196. 4.832 124.600 ↓ 1.0 12,768 1

Subquery Scan on *SELECT* 3 (cost=1,678.11..3,327.75 rows=12,704 width=106) (actual time=41.772..124.600 rows=12,768 loops=1)

197. 74.980 119.768 ↓ 1.0 12,768 1

Hash Join (cost=1,678.11..3,200.71 rows=12,704 width=106) (actual time=41.770..119.768 rows=12,768 loops=1)

  • Hash Cond: (i_2.contractdpid = cdp_2.contractdpid)
198. 3.092 3.092 ↓ 1.0 12,768 1

Seq Scan on userindex i_2 (cost=0.00..331.60 rows=12,704 width=42) (actual time=0.005..3.092 rows=12,768 loops=1)

  • Filter: ((indexdate IS NULL) OR (indexdate <= '9999-12-31 00:00:00+01'::timestamp with time zone))
199. 5.575 41.696 ↑ 1.0 10,619 1

Hash (cost=1,545.37..1,545.37 rows=10,619 width=68) (actual time=41.696..41.696 rows=10,619 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 839kB
200. 4.421 36.121 ↑ 1.0 10,619 1

Hash Left Join (cost=411.74..1,545.37 rows=10,619 width=68) (actual time=4.005..36.121 rows=10,619 loops=1)

  • Hash Cond: (contract_2.supplierid = s_2.supplierid)
201. 7.567 31.696 ↑ 1.0 10,619 1

Hash Join (cost=410.70..1,398.31 rows=10,619 width=40) (actual time=3.993..31.696 rows=10,619 loops=1)

  • Hash Cond: (cdp_2.contractid = contract_2.contractid)
202. 6.242 20.171 ↑ 1.0 10,619 1

Merge Join (cost=0.61..789.12 rows=10,619 width=36) (actual time=0.026..20.171 rows=10,619 loops=1)

  • Merge Cond: (dp_2.pointid = cdp_2.pointid)
203. 5.780 5.780 ↑ 1.0 8,487 1

Index Scan using deliverypoint_pkey on deliverypoint dp_2 (cost=0.29..290.59 rows=8,487 width=24) (actual time=0.010..5.780 rows=8,487 loops=1)

204. 8.149 8.149 ↑ 1.0 10,619 1

Index Scan using idx_contractdpjournal_pointid_pk on contractdpjournal cdp_2 (cost=0.29..344.57 rows=10,619 width=20) (actual time=0.009..8.149 rows=10,619 loops=1)

205. 1.836 3.958 ↑ 1.0 10,404 1

Hash (cost=280.04..280.04 rows=10,404 width=8) (actual time=3.958..3.958 rows=10,404 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 407kB
206. 2.122 2.122 ↑ 1.0 10,404 1

Seq Scan on contract contract_2 (cost=0.00..280.04 rows=10,404 width=8) (actual time=0.005..2.122 rows=10,404 loops=1)

207. 0.001 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=36) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
208. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on supplier s_2 (cost=0.00..1.02 rows=2 width=36) (actual time=0.002..0.003 rows=2 loops=1)

Planning time : 33.316 ms
Execution time : 12,909.899 ms