[ getting back to testing this patch ...] On my last email you replied: >> Debugging this query shows that all if conditions on >> setup_eager_aggregation() returns false and create_agg_clause_infos() >> and create_grouping_expr_infos() are called. The RelAggInfo->agg_useful >> is also being set to true so I would expect to see Finalize and Partial >> agg nodes, is this correct or am I missing something here? > > Well, just because eager aggregation *can* be applied does not mean > that it *will* be; it depends on whether it produces a lower-cost > execution plan. This transformation is cost-based, so it's not the > right mindset to assume that it will always be applied when possible. > Sorry for the noise here. I didn't consider the costs.
On Sun Sep 28, 2025 at 11:09 PM -03, Richard Guo wrote: > On Thu, Sep 25, 2025 at 1:23 PM Richard Guo <[email protected]> wrote: >> Attached is an updated version of the patch with these optimizations >> applied. > > FWIW, I plan to do another self-review of this patch soon, with the > goal of assessing whether it's ready to be pushed. If anyone has any > concerns about any part of the patch or would like to review it, I > would greatly appreciate hearing from you. > I spent some time testing patch v23 using the TPC-DS benchmark and am seeing worse execution times when using eager aggregation. The most interesting cases are: Query | planning time | execution time | query 31 | -2.03% │ -99.56% │ query 71 | -15.51% │ -68.88% │ query 20 | -10.77% │ -32.40% │ query 26 | -28.01% │ -32.35% │ query 85 | -10.57% │ -31.91% │ query 77 | -30.07% │ -31.38% │ query 69 | -32.79% │ -29.21% │ query 32 | -68.48% │ -27.89% │ query 57 | -7.99% │ -27.32% │ query 91 | -24.81% │ -26.20% │ query 23 | -11.72% │ -18.24% │ The query 31 seems bad, I don't know if I'm doing something completely wrong but I've just setup a TPC-DS database and then executed the query on master and with the v23 patch and I got these results: Master: Planning Time: 3.191 ms Execution Time: 16950.619 ms Patch: Planning Time: 3.257 ms Execution Time: 3848355.646 ms Note that I've executed ANALYZE before running the queries on both scenarios (master and patched). I'm attaching an EXPLAIN(ANALYZE) output for the query 31 from master and with the patch applied. Please let me know if there is any other test that I can run to benchmark this patch. -- Matheus Alcantara
â Sort (cost=656889.77..656889.77 rows=1 width=210) (actual
time=17164.506..17164.519 rows=43.00 loops=1)
â
â Sort Key: ((ss3.store_sales / ss2.store_sales))
â
â Sort Method: quicksort Memory: 28kB
â
â Buffers: shared hit=6533 read=69203, temp read=4343 written=12055
â
â CTE ss
â
â -> HashAggregate (cost=323021.86..377372.99 rows=1476800 width=54)
(actual time=3389.564..3677.220 rows=35136.00 loops=1)
â
â Group Key: customer_address.ca_county, date_dim.d_qoy,
date_dim.d_year
â
â Planned Partitions: 64 Batches: 65 Memory Usage: 8209kB Disk
Usage: 56840kB
â
â Buffers: shared hit=3408 read=50944, temp read=3962 written=10947
â
â -> Hash Join (cost=5328.60..100701.93 rows=2625180 width=28)
(actual time=46.394..2034.907 rows=2685273.00 loops=1)
â
â Hash Cond: (store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
â
â Buffers: shared hit=3408 read=50944
â
â -> Hash Join (cost=2261.00..90416.35 rows=2749551
width=24) (actual time=18.753..1396.048 rows=2750429.00 loops=1)
â
â Hash Cond: (store_sales.ss_addr_sk =
customer_address.ca_address_sk)
â
â Buffers: shared hit=1984 read=50944
â
â -> Seq Scan on store_sales (cost=0.00..80594.17
rows=2880217 width=14) (actual time=0.063..228.063 rows=2880404.00 loops=1)
â
â Buffers: shared hit=848 read=50944
â
â -> Hash (cost=1636.00..1636.00 rows=50000 width=18)
(actual time=18.651..18.651 rows=50000.00 loops=1)
â
â Buckets: 65536 Batches: 1 Memory Usage:
3052kB
â
â Buffers: shared hit=1136
â
â -> Seq Scan on customer_address
(cost=0.00..1636.00 rows=50000 width=18) (actual time=0.005..9.555
rows=50000.00 loops=1)
â
â Buffers: shared hit=1136
â -> Hash (cost=2154.49..2154.49 rows=73049 width=12)
(actual time=27.627..27.629 rows=73049.00 loops=1)
â
â Buckets: 131072 Batches: 1 Memory Usage: 4163kB
â
â Buffers: shared hit=1424
â
â -> Seq Scan on date_dim (cost=0.00..2154.49
rows=73049 width=12) (actual time=0.009..15.154 rows=73049.00 loops=1)
â
â Buffers: shared hit=1424
â
â CTE ws
â
â -> HashAggregate (cost=96009.03..114825.35 rows=718952 width=54)
(actual time=977.215..1014.889 rows=23320.00 loops=1)
â
â Group Key: customer_address_1.ca_county, date_dim_1.d_qoy,
date_dim_1.d_year
â
â Planned Partitions: 32 Batches: 33 Memory Usage: 8209kB Disk
Usage: 6032kB
â
â Buffers: shared hit=3125 read=18259, temp read=381 written=1108
â
â -> Hash Join (cost=5328.60..35122.78 rows=718952 width=28)
(actual time=46.623..611.054 rows=719118.00 loops=1)
â
â Hash Cond: (web_sales.ws_bill_addr_sk =
customer_address_1.ca_address_sk)
â Buffers: shared hit=3125 read=18259
â
â -> Hash Join (cost=3067.60..30973.94 rows=719120
width=18) (actual time=27.691..424.273 rows=719195.00 loops=1)
â
â Hash Cond: (web_sales.ws_sold_date_sk =
date_dim_1.d_date_sk)
â
â Buffers: shared hit=1989 read=18259
â
â -> Seq Scan on web_sales (cost=0.00..26017.84
rows=719384 width=14) (actual time=0.082..63.389 rows=719384.00 loops=1)
â
â Buffers: shared hit=565 read=18259
â
â -> Hash (cost=2154.49..2154.49 rows=73049 width=12)
(actual time=27.538..27.538 rows=73049.00 loops=1)
â
â Buckets: 131072 Batches: 1 Memory Usage:
4163kB
â
â Buffers: shared hit=1424
â
â -> Seq Scan on date_dim date_dim_1
(cost=0.00..2154.49 rows=73049 width=12) (actual time=0.006..14.914
rows=73049.00 loops=1)
â
â Buffers: shared hit=1424
â
â -> Hash (cost=1636.00..1636.00 rows=50000 width=18)
(actual time=18.902..18.902 rows=50000.00 loops=1)
â
â Buckets: 65536 Batches: 1 Memory Usage: 3052kB
â
â Buffers: shared hit=1136
â
â -> Seq Scan on customer_address customer_address_1
(cost=0.00..1636.00 rows=50000 width=18) (actual time=0.008..9.727
rows=50000.00 loops=1)
â
â Buffers: shared hit=1136
â
â -> Nested Loop (cost=0.00..164691.41 rows=1 width=210) (actual
time=4817.695..17164.430 rows=43.00 loops=1)
â
â Join Filter: (((ss1.ca_county)::text = (ws2.ca_county)::text) AND
(CASE WHEN (ws1.web_sales > '0'::numeric) THEN (ws2.web_sales / ws1.web_sales)
ELSE NULL::numeric END > CASE WHEN (ss1.store_sales > '0'::numeric) THEN
(ss2.store_sales / ss1.store_sales) ELSE NULL::numeric END) AND (CASE WHEN
(ws2.web_sales > '0'::numeric) THEN (ws3.web_sales / ws2.web_sales) ELSE
NULL::numeric END > CASE WHEN (ss2.store_sales > '0'::numeric) THEN
(ss3.store_sales / ss2.store_sales) ELSE NULL::numeric END)) â
â Rows Removed by Join Filter: 527207
â
â Buffers: shared hit=6533 read=69203, temp read=4343 written=12055
â
â -> Nested Loop (cost=0.00..146716.93 rows=1 width=554) (actual
time=4671.968..15501.760 rows=570.00 loops=1)
â
â Join Filter: ((ss1.ca_county)::text = (ss3.ca_county)::text)
â
â Rows Removed by Join Filter: 1038674
â
â Buffers: shared hit=6533 read=69203, temp read=4343
written=12055
â
â -> Nested Loop (cost=0.00..109796.47 rows=1 width=444)
(actual time=4669.164..12922.095 rows=578.00 loops=1)
â Join Filter: ((ss1.ca_county)::text =
(ss2.ca_county)::text)
â
â Rows Removed by Join Filter: 1008217
â
â Buffers: shared hit=6533 read=69203, temp read=3559
written=12055
â
â -> Nested Loop (cost=0.00..72876.00 rows=1 width=334)
(actual time=4666.835..10231.481 rows=617.00 loops=1)
â
â Join Filter: ((ss1.ca_county)::text =
(ws1.ca_county)::text)
â
â Rows Removed by Join Filter: 1089697
â
â Buffers: shared hit=6533 read=69203, temp
read=3559 written=12055
â
â -> Nested Loop (cost=0.00..35954.71 rows=2
width=220) (actual time=1031.594..3687.112 rows=662.00 loops=1)
â
â Join Filter: ((ws1.ca_county)::text =
(ws3.ca_county)::text)
â
â Rows Removed by Join Filter: 1148109
â
â Buffers: shared hit=3125 read=18259, temp
read=381 written=1108
â
â -> CTE Scan on ws ws1
(cost=0.00..17973.80 rows=18 width=110) (actual time=977.224..980.082
rows=911.00 loops=1)
â Filter: ((d_qoy = 1) AND (d_year =
1999))
â
â Rows Removed by Filter: 22409
â
â Storage: Memory Maximum Storage:
1700kB
â
â Buffers: shared hit=3125 read=18259,
temp written=1107
â
â -> CTE Scan on ws ws3
(cost=0.00..17973.80 rows=18 width=110) (actual time=0.005..2.857 rows=1261.00
loops=911)
â
â Filter: ((d_year = 1999) AND (d_qoy =
3))
â
â Rows Removed by Filter: 22059
â
â Storage: Memory Maximum Storage:
1700kB
â
â Buffers: temp read=381 written=1
â
â -> CTE Scan on ss ss1 (cost=0.00..36920.00
rows=37 width=114) (actual time=5.121..9.740 rows=1647.00 loops=662)
â
â Filter: ((d_qoy = 1) AND (d_year = 1999))
â
â Rows Removed by Filter: 33489
â
â Storage: Memory Maximum Storage: 2636kB
â
â Buffers: shared hit=3408 read=50944, temp
read=3178 written=10947
â
â -> CTE Scan on ss ss2 (cost=0.00..36920.00 rows=37
width=110) (actual time=0.001..4.216 rows=1635.00 loops=617)
â
â Filter: ((d_year = 1999) AND (d_qoy = 2))
â
â Rows Removed by Filter: 33501
â
â Storage: Memory Maximum Storage: 2636kB
â
â -> CTE Scan on ss ss3 (cost=0.00..36920.00 rows=37
width=110) (actual time=0.006..4.305 rows=1798.00 loops=578)
â
â Filter: ((d_year = 1999) AND (d_qoy = 3))
â
â Rows Removed by Filter: 33338
â
â Storage: Memory Maximum Storage: 2636kB
â
â Buffers: temp read=784
â
â -> CTE Scan on ws ws2 (cost=0.00..17973.80 rows=18 width=110)
(actual time=0.001..2.810 rows=925.00 loops=570)
â
â Filter: ((d_year = 1999) AND (d_qoy = 2))
â Rows Removed by Filter: 22395
â
â Storage: Memory Maximum Storage: 1700kB
â
â Planning:
â
â Buffers: shared hit=12
â
â Planning Time: 2.180 ms
â
â Execution Time: 17166.558 ms
â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Sort (cost=302668.66..302668.66 rows=1 width=210) (actual
time=3825537.172..3825541.540 rows=43.00 loops=1)
â
â Sort Key: ((ss3.store_sales / ss2.store_sales))
â
â Sort Method: quicksort Memory: 28kB
â
â Buffers: shared hit=21757 read=69012, temp read=14486 written=25552
â
â CTE ss
â
â -> Finalize GroupAggregate (cost=178135.51..215272.86 rows=262517
width=54) (actual time=1471.638..1733.635 rows=35117.00 loops=1)
â
â Group Key: customer_address.ca_county, date_dim.d_qoy,
date_dim.d_year
â
â Buffers: shared hit=3533 read=50849, temp read=14486
written=25552
â
â -> Gather Merge (cost=178135.51..208709.94 rows=262517
width=54) (actual time=1471.627..1586.417 rows=234867.00 loops=1)
â
â Workers Planned: 2
â
â Workers Launched: 2
â
â Buffers: shared hit=3533 read=50849, temp read=14486
written=25552
â
â -> Sort (cost=177135.48..177408.94 rows=109382 width=54)
(actual time=1463.292..1497.110 rows=78658.67 loops=3)
â
â Sort Key: customer_address.ca_county, date_dim.d_qoy,
date_dim.d_year
â
â Sort Method: external merge Disk: 7944kB
â
â Buffers: shared hit=3533 read=50849, temp read=14486
written=25552
â
â Worker 0: Sort Method: external merge Disk: 8000kB
â
â Worker 1: Sort Method: external merge Disk: 7928kB
â
â -> Parallel Hash Join (cost=147862.49..164239.25
rows=109382 width=54) (actual time=839.965..1235.101 rows=80523.33 loops=3)
â
â Hash Cond: (store_sales.ss_sold_date_sk =
date_dim.d_date_sk)
â
â Buffers: shared hit=3503 read=50849, temp
read=11502 written=22562
â
â -> Parallel Hash Join
(cost=145471.66..161547.68 rows=114565 width=50) (actual time=820.740..1192.922
rows=96392.00 loops=3)
â
â Hash Cond: (store_sales.ss_addr_sk =
customer_address.ca_address_sk)
â
â Buffers: shared hit=2079 read=50849, temp
read=11502 written=22562
â
â -> Partial HashAggregate
(cost=143673.89..158993.80 rows=288022 width=40) (actual time=810.581..1155.245
rows=98213.67 loops=3)
â
â Group Key:
store_sales.ss_sold_date_sk, store_sales.ss_addr_sk
â
â Planned Partitions: 16 Batches: 17
Memory Usage: 8337kB Disk Usage: 31640kB
â
â Buffers: shared hit=943 read=50849,
temp read=11502 written=22562
â
â Worker 0: Batches: 17 Memory
Usage: 8337kB Disk Usage: 31760kB
â
â Worker 1: Batches: 17 Memory
Usage: 8337kB Disk Usage: 31640kB
â
â -> Parallel Seq Scan on
store_sales (cost=0.00..63792.90 rows=1200090 width=14) (actual
time=0.126..79.442 rows=960134.67 loops=3)
â
â Buffers: shared hit=943
read=50849
â
â -> Parallel Hash (cost=1430.12..1430.12
rows=29412 width=18) (actual time=10.036..10.038 rows=16666.67 loops=3)
â
â Buckets: 65536 Batches: 1 Memory
Usage: 3264kB
â
â Buffers: shared hit=1136
â
â -> Parallel Seq Scan on
customer_address (cost=0.00..1430.12 rows=29412 width=18) (actual
time=0.007..5.102 rows=16666.67 loops=3)
â
â Buffers: shared hit=1136
â
â -> Parallel Hash (cost=1853.70..1853.70
rows=42970 width=12) (actual time=19.092..19.094 rows=24349.67 loops=3)
â
â Buckets: 131072 Batches: 1 Memory
Usage: 4512kB
â
â Buffers: shared hit=1424
â
â -> Parallel Seq Scan on date_dim
(cost=0.00..1853.70 rows=42970 width=12) (actual time=0.012..10.264
rows=24349.67 loops=3)
â
â Buffers: shared hit=1424
â
â CTE ws
â
â -> Finalize GroupAggregate (cost=52144.19..62314.79 rows=71894
width=54) (actual time=275.121..340.107 rows=23312.00 loops=1)
â
â Group Key: customer_address_1.ca_county, date_dim_1.d_qoy,
date_dim_1.d_year
â
â Buffers: shared hit=18224 read=18163
â
â -> Gather Merge (cost=52144.19..60517.44 rows=71894 width=54)
(actual time=275.107..297.072 rows=60190.00 loops=1)
â
â Workers Planned: 2
â
â Workers Launched: 2
â
â Buffers: shared hit=18224 read=18163
â
â -> Sort (cost=51144.17..51219.06 rows=29956 width=54)
(actual time=271.870..272.906 rows=20293.33 loops=3)
â
â Sort Key: customer_address_1.ca_county,
date_dim_1.d_qoy, date_dim_1.d_year
â
â Sort Method: quicksort Memory: 2931kB
â
â Buffers: shared hit=18224 read=18163
â
â Worker 0: Sort Method: quicksort Memory: 2938kB
â
â Worker 1: Sort Method: quicksort Memory: 2955kB
â
â -> Nested Loop (cost=43571.15..48916.86 rows=29956
width=54) (actual time=184.657..215.740 rows=20419.67 loops=3)
â
â Buffers: shared hit=18194 read=18163
â
â -> Parallel Hash Join
(cost=43570.84..47586.10 rows=29967 width=50) (actual time=184.630..201.358
rows=20451.00 loops=3)
â
â Hash Cond: (web_sales.ws_bill_addr_sk =
customer_address_1.ca_address_sk)
â
â Buffers: shared hit=1797 read=18163
â
â -> Partial HashAggregate
(cost=41773.08..45599.48 rows=71938 width=40) (actual time=177.706..188.464
rows=20477.33 loops=3)
â
â Group Key:
web_sales.ws_sold_date_sk, web_sales.ws_bill_addr_sk
â
â Planned Partitions: 4 Batches: 1
Memory Usage: 7953kB
â
â Buffers: shared hit=661 read=18163
â
â Worker 0: Batches: 1 Memory
Usage: 7953kB
â
â Worker 1: Batches: 1 Memory
Usage: 7953kB
â
â -> Parallel Seq Scan on web_sales
(cost=0.00..21821.43 rows=299743 width=14) (actual time=0.106..23.122
rows=239794.67 loops=3)
â
â Buffers: shared hit=661
read=18163
â
â -> Parallel Hash (cost=1430.12..1430.12
rows=29412 width=18) (actual time=6.846..6.847 rows=16666.67 loops=3)
â
â Buckets: 65536 Batches: 1 Memory
Usage: 3264kB
â
â Buffers: shared hit=1136
â
â -> Parallel Seq Scan on
customer_address customer_address_1 (cost=0.00..1430.12 rows=29412 width=18)
(actual time=0.008..3.586 rows=16666.67 loops=3)
â
â Buffers: shared hit=1136
â
â -> Memoize (cost=0.30..0.33 rows=1 width=12)
(actual time=0.000..0.000 rows=1.00 loops=61353)
â
â Cache Key: web_sales.ws_sold_date_sk
â
â Cache Mode: logical
â
â Estimates: capacity=1822 distinct
keys=1822 lookups=29967 hit percent=93.92%
â
â Hits: 18542 Misses: 1824 Evictions: 0
Overflows: 0 Memory Usage: 200kB
â
â Buffers: shared hit=16397
â
â Worker 0: Hits: 18589 Misses: 1821
Evictions: 0 Overflows: 0 Memory Usage: 200kB
â
â Worker 1: Hits: 18754 Misses: 1823
Evictions: 0 Overflows: 0 Memory Usage: 200kB
â
â -> Index Scan using date_dim_pkey on
date_dim date_dim_1 (cost=0.29..0.32 rows=1 width=12) (actual
time=0.002..0.002 rows=1.00 loops=5468)
â
â Index Cond: (d_date_sk =
web_sales.ws_sold_date_sk)
â
â Index Searches: 5465
â
â Buffers: shared hit=16397
â
â -> Nested Loop (cost=0.00..25081.00 rows=1 width=210) (actual
time=43808.287..3825536.966 rows=43.00 loops=1)
â
â Join Filter: (((ss1.ca_county)::text = (ss2.ca_county)::text) AND
(CASE WHEN (ws1.web_sales > '0'::numeric) THEN (ws2.web_sales / ws1.web_sales)
ELSE NULL::numeric END > CASE WHEN (ss1.store_sales > '0'::numeric) THEN
(ss2.store_sales / ss1.store_sales) ELSE NULL::numeric END)) â
â Rows Removed by Join Filter: 226832
â
â Buffers: shared hit=7500 read=22936, temp read=4819 written=8505
â
â -> Merge Join (cost=0.00..8360.31 rows=1 width=224) (actual
time=1747.759..1760.887 rows=825.00 loops=1)
â
â Merge Cond: ((ss1.ca_county)::text = (ws1.ca_county)::text)
â
â Buffers: shared hit=7500 read=22936, temp read=4321
written=8505
â
â -> CTE Scan on ss ss1 (cost=0.00..6562.93 rows=7 width=114)
(actual time=1471.648..1477.297 rows=1647.00 loops=1)
â
â Filter: ((d_qoy = 1) AND (d_year = 1999))
â
â Rows Removed by Filter: 33470
â
â Storage: Memory Maximum Storage: 2635kB
â
â Buffers: shared hit=1278 read=16903, temp read=4321
written=8505
â
â -> Materialize (cost=0.00..1797.36 rows=2 width=110)
(actual time=275.335..280.952 rows=911.00 loops=1)
â
â Storage: Memory Maximum Storage: 17kB
â
â Buffers: shared hit=6222 read=6033
â
â -> CTE Scan on ws ws1 (cost=0.00..1797.35 rows=2
width=110) (actual time=275.333..279.774 rows=911.00 loops=1)
â
â Filter: ((d_qoy = 1) AND (d_year = 1999))
â
â Rows Removed by Filter: 22390
â
â Storage: Memory Maximum Storage: 1700kB
â
â Buffers: shared hit=6222 read=6033
â
â -> Nested Loop (cost=0.00..16720.65 rows=1 width=440) (actual
time=5.913..4634.838 rows=275.00 loops=825)
â
â Join Filter: (((ss2.ca_county)::text = (ss3.ca_county)::text)
AND (CASE WHEN (ws2.web_sales > '0'::numeric) THEN (ws3.web_sales /
ws2.web_sales) ELSE NULL::numeric END > CASE WHEN (ss2.store_sales >
'0'::numeric) THEN (ss3.store_sales / ss2.store_sales) ELSE NULL::numeric END))
â
â Rows Removed by Join Filter: 1037001
â
â Buffers: temp read=498
â
â -> Merge Join (cost=0.00..8360.31 rows=1 width=220) (actual
time=0.001..5.266 rows=844.00 loops=825)
â
â Merge Cond: ((ss2.ca_county)::text =
(ws2.ca_county)::text)
â
â -> CTE Scan on ss ss2 (cost=0.00..6562.93 rows=7
width=110) (actual time=0.001..4.131 rows=1634.00 loops=825)
â
â Filter: ((d_year = 1999) AND (d_qoy = 2))
â
â Rows Removed by Filter: 33468
â
â Storage: Memory Maximum Storage: 2635kB
â
â -> Materialize (cost=0.00..1797.36 rows=2 width=110)
(actual time=0.000..0.053 rows=925.00 loops=825)
â
â Storage: Memory Maximum Storage: 74kB
â
â -> CTE Scan on ws ws2 (cost=0.00..1797.35
rows=2 width=110) (actual time=0.001..2.784 rows=925.00 loops=1)
â
â Filter: ((d_year = 1999) AND (d_qoy = 2))
â
â Rows Removed by Filter: 22382
â
â Storage: Memory Maximum Storage: 1700kB
â
â -> Merge Join (cost=0.00..8360.31 rows=1 width=220) (actual
time=0.002..5.383 rows=1229.00 loops=696300)
â
â Merge Cond: ((ss3.ca_county)::text =
(ws3.ca_county)::text)
â
â Buffers: temp read=498
â
â -> CTE Scan on ss ss3 (cost=0.00..6562.93 rows=7
width=110) (actual time=0.001..4.051 rows=1796.00 loops=696300)
â
â Filter: ((d_year = 1999) AND (d_qoy = 3))
â
â Rows Removed by Filter: 33292
â
â Storage: Memory Maximum Storage: 2635kB
â
â Buffers: temp read=498
â
â -> Materialize (cost=0.00..1797.36 rows=2 width=110)
(actual time=0.000..0.047 rows=1261.00 loops=696300)
â
â Storage: Memory Maximum Storage: 95kB
â
â -> CTE Scan on ws ws3 (cost=0.00..1797.35
rows=2 width=110) (actual time=0.001..74.725 rows=1261.00 loops=1)
â
â Filter: ((d_year = 1999) AND (d_qoy = 3))
â
â Rows Removed by Filter: 22051
â
â Storage: Memory Maximum Storage: 1700kB
â
â Planning:
â
â Buffers: shared hit=12
â
â Planning Time: 4.951 ms
â
â Execution Time: 3825542.556 ms
â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
