From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
---|---|
To: | "Hannu Krosing" <hannu(at)tm(dot)ee> |
Cc: | <ryan(at)paymentalliance(dot)net>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: count and group by question |
Date: | 2002-06-19 22:31:43 |
Message-ID: | D90A5A6C612A39408103E6ECDD77B82920CFA7@voyager.corporate.connx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Hannu Krosing [mailto:hannu(at)tm(dot)ee]
> Sent: Wednesday, June 19, 2002 1:25 PM
> To: Dann Corbit
> Cc: ryan(at)paymentalliance(dot)net; pgsql-hackers(at)postgresql(dot)org
> Subject: RE: [HACKERS] count and group by question
>
>
> On Thu, 2002-06-20 at 03:15, Dann Corbit wrote:
> > > > Which reminds me, it would be nice to have the cube/rollup
> > > sort of OLAP
> > > > stuff from SQL99 ISO/IEC 9075-2:1999 (E) in PostgreSQL:
> > >
> > > It seems like simple ROLLUP and () (i.e. grandTotal) would be
> > > doable by
> > > current executor and plans, i.e. sort and then aggregate,
> > > just add more
> > > aggregate fields and have different start/finalize conditions
> > >
> > > CUBE and GROUPING SETS will probably need another kind of
> execution
> > > plan, perhaps some kind of hashed tuple list.
> >
> > Rollup can be simulated by a bunch of union all... Here is
> an example:
> > http://www.quest-pipelines.com/newsletter-v2/rollup.htm
>
> I guess that all groupings are, just it would be much more efficient
> (not to mention simpler for user ;) if they could be done in one pass.
>
> But rewriting them to UNIONS seems a good stopgap solution.
Yes. It was to show the concept (not to you). Obviously, it would be
much better to do it correctly internally (which is why I asked for the
feature).
> IIRC the OLAP supplement had also an option to tell wheather
> NULLS sort
> at the beginning or end.
From | Date | Subject | |
---|---|---|---|
Next Message | Ryan Mahoney | 2002-06-19 23:00:25 | Re: count and group by question |
Previous Message | Dann Corbit | 2002-06-19 22:15:49 | Re: count and group by question |