Re: WIP Patch for GROUPING SETS phase 1 - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: WIP Patch for GROUPING SETS phase 1
Date
Msg-id 87lhps69jg.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: WIP Patch for GROUPING SETS phase 1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>>> Honestly, ChainAggregate is _trivial_ compared to trying to make the>>> GroupAggregate code deal with multiple
inputs,or trying to make some>>> new sort of plumbing node to feed input to those sorts.  (You'd think>>> that it
shouldbe possible to use the existing CTE mechanics to do it,>>> but noooo... the existing code is actively and
ferociouslyhostile to>>> the idea of adding new CTEs from within the planner.)
 
>> That's unfortunate.
Tom> I'm less than convinced that it's true ...

Maybe you can figure out how, but I certainly didn't see a reasonable way.

I would also question one aspect of the desirability - using the CTE
mechanism has the downside of needing an extra tuplestore with the
full input data set in it, whereas the chain mechanism only has
aggregated data in its tuplestore which should be much smaller.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: pg_background (and more parallelism infrastructure patches)
Next
From: Petr Jelinek
Date:
Subject: Add shutdown_at_recovery_target option to recovery.conf