Unix Technical Forum

CUBE, ROLLUP, GROUPING SETS?

This is a discussion on CUBE, ROLLUP, GROUPING SETS? within the Pgsql General forums, part of the PostgreSQL category; --> Hi. Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in future PostgreSQL versions? I could not ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 11:47 AM
stig erikson
 
Posts: n/a
Default CUBE, ROLLUP, GROUPING SETS?

Hi.
Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in future PostgreSQL versions?
I could not find any info on the TODO-page.

/stig

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 12:06 PM
Robert Treat
 
Posts: n/a
Default Re: CUBE, ROLLUP, GROUPING SETS?

On Tuesday 10 October 2006 15:19, stig erikson wrote:
> Hi.
> Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in
> future PostgreSQL versions? I could not find any info on the TODO-page.
>


I've heard people mention it, but no one has ever come up with a solid
proposal or patch. Depending on what your doing there are ways to simulate
those things with more standard sql.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 12:06 PM
Nicolas Barbier
 
Posts: n/a
Default Re: CUBE, ROLLUP, GROUPING SETS?

2006/10/28, Robert Treat <xzilla@users.sourceforge.net>:

> On Tuesday 10 October 2006 15:19, stig erikson wrote:
>
>> Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in
>> future PostgreSQL versions? I could not find any info on the TODO-page.

>
> I've heard people mention it, but no one has ever come up with a solid
> proposal or patch. Depending on what your doing there are ways to simulate
> those things with more standard sql.


CUBE, ROLLUP and GROUPING SETS are at least part of SQL 2003.
Supporting them would probably also include optimized ways to execute
them, like calculating all aggregations in one run for ROLLUP (instead
of doing multiple scans).

greetings,
Nicolas

--
Nicolas Barbier
http://www.gnu.org/philosophy/no-word-attachments.html

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-09-2008, 12:06 PM
Robert Treat
 
Posts: n/a
Default Re: CUBE, ROLLUP, GROUPING SETS?

On Saturday 28 October 2006 19:47, Nicolas Barbier wrote:
> 2006/10/28, Robert Treat <xzilla@users.sourceforge.net>:
> > On Tuesday 10 October 2006 15:19, stig erikson wrote:
> >> Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in
> >> future PostgreSQL versions? I could not find any info on the TODO-page.

> >
> > I've heard people mention it, but no one has ever come up with a solid
> > proposal or patch. Depending on what your doing there are ways to
> > simulate those things with more standard sql.

>
> CUBE, ROLLUP and GROUPING SETS are at least part of SQL 2003.
> Supporting them would probably also include optimized ways to execute
> them, like calculating all aggregations in one run for ROLLUP (instead
> of doing multiple scans).
>


I didn't say anyone was against the idea, just that we've yet to see someone
with the appropriately shaped tuits show up...

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-09-2008, 12:06 PM
Christopher Browne
 
Posts: n/a
Default Re: CUBE, ROLLUP, GROUPING SETS?

Centuries ago, Nostradamus foresaw when nicolas.barbier@gmail.com ("Nicolas Barbier") would write:
> 2006/10/28, Robert Treat <xzilla@users.sourceforge.net>:
>
>> On Tuesday 10 October 2006 15:19, stig erikson wrote:
>>
>>> Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in
>>> future PostgreSQL versions? I could not find any info on the TODO-page.

>>
>> I've heard people mention it, but no one has ever come up with a
>> solid proposal or patch. Depending on what your doing there are
>> ways to simulate those things with more standard sql.

>
> CUBE, ROLLUP and GROUPING SETS are at least part of SQL 2003.
> Supporting them would probably also include optimized ways to
> execute them, like calculating all aggregations in one run for
> ROLLUP (instead of doing multiple scans).


I'm sure a good implementation would include such things.

I'm not sure it's anywhere near trivial to do so; it may be nontrivial
to efficiently do all those aggregates at once. We'll presumably
discover this if and when someone begins work on it...
--
"cbbrowne","@","gmail.com"
http://linuxdatabases.info/info/postgresql.html
"In the long run every program becomes rococo - then rubble."
-- Alan Perlis
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-09-2008, 12:20 PM
Bruce Momjian
 
Posts: n/a
Default Re: CUBE, ROLLUP, GROUPING SETS?

Christopher Browne wrote:
> Centuries ago, Nostradamus foresaw when nicolas.barbier@gmail.com ("Nicolas Barbier") would write:
> > 2006/10/28, Robert Treat <xzilla@users.sourceforge.net>:
> >
> >> On Tuesday 10 October 2006 15:19, stig erikson wrote:
> >>
> >>> Are there any plans to implement CUBE, ROLLUP and/or GROUPING SETS in
> >>> future PostgreSQL versions? I could not find any info on the TODO-page.
> >>
> >> I've heard people mention it, but no one has ever come up with a
> >> solid proposal or patch. Depending on what your doing there are
> >> ways to simulate those things with more standard sql.

> >
> > CUBE, ROLLUP and GROUPING SETS are at least part of SQL 2003.
> > Supporting them would probably also include optimized ways to
> > execute them, like calculating all aggregations in one run for
> > ROLLUP (instead of doing multiple scans).

>
> I'm sure a good implementation would include such things.
>
> I'm not sure it's anywhere near trivial to do so; it may be nontrivial
> to efficiently do all those aggregates at once. We'll presumably
> discover this if and when someone begins work on it...


Our TODO has:

* Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com