Re: Final Patch for GROUPING SETS

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Greg Stark <stark(at)mit(dot)edu>, Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>, Svenne Krap <svenne(at)krap(dot)dk>
Subject: Re: Final Patch for GROUPING SETS
Date: 2015-05-14 06:32:04
Message-ID: 20150514063204.GA3707771@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 14, 2015 at 07:50:31AM +0200, Andres Freund wrote:
> I still believe that the general approach of chaining vs. a union or CTE
> is correct due to the efficiency arguments upthread. My problem is
> that, unless I very much misunderstand something, the current
> implementation can end up requiring roughly #sets * #input of additional
> space for the "sidechannel tuplestore" in some bad cases. That happens
> if you group by a couple clauses that each lead to a high number of
> groups.

Correct.

> Andrew, is that a structure you could live with, or not?
>
> Others, what do you think?

Andrew and I discussed that very structure upthread:

http://www.postgresql.org/message-id/20141231085845.GA2148306@tornado.leadboat.com
http://www.postgresql.org/message-id/87d26zd9k8.fsf@news-spur.riddles.org.uk
http://www.postgresql.org/message-id/20141231210553.GB2159277@tornado.leadboat.com

I still believe the words I wrote in my two messages cited.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-14 06:36:28 Re: proposal: contrib module - generic command scheduler
Previous Message Jim Nasby 2015-05-14 06:01:11 Re: proposal: contrib module - generic command scheduler