

Pgsql: Support Grouping Sets, Cube, and Rollup - amitlan
http://www.postgresql.org/message-id/E1YtRD5-0005Q7-SM@gemulon.postgresql.org

======
ddorian43
I was just looking at the wiki page
[https://wiki.postgresql.org/wiki/Grouping_Sets](https://wiki.postgresql.org/wiki/Grouping_Sets)
yesterday hoping that one day it would be in.

I now see that postgresql is the one true database. Everyone should abandon
all other databases that don't have special features (ex: sqlite embedded).

~~~
StavrosK
> Everyone should abandon all other databases that don't have special features
> (ex: sqlite embedded).

SQLite embedded _does_ have special features. It's embedded.

~~~
minot
I believe GP used that as an example of what _not_ to abandon

~~~
StavrosK
Is "ex" short for "example" or "except"?

~~~
ddorian43
I use it for both. In that case it was 'example'.

------
azinman2
Wish they'd give some example sql statements to fully appreciate it.

~~~
glogla
It's on the developer version docs:
[http://www.postgresql.org/docs/devel/static/queries-table-
ex...](http://www.postgresql.org/docs/devel/static/queries-table-
expressions.html#QUERIES-GROUPING-SETS)

~~~
StavrosK
Also here:
[https://wiki.postgresql.org/wiki/Grouping_Sets](https://wiki.postgresql.org/wiki/Grouping_Sets)

------
chillydawg
PGSQL just keeps getting better! Even gives Oracle a run for its money in a
lot of areas.

~~~
gaius
I am a huge fan and advocate of PG but just for some perspective: CUBE and
ROLLUP were present in SQL Server in the '90s.

~~~
jeltz
I agree with you about PostgreSQL being late at adding these features, but SQL
Server added CUBE and ROLLUP in 2008. They had GROUPING SETS longer, I think
since 2000.

~~~
gaius
Here's an article on them from '99\. Version 6.5 was released in '96.

[http://sqlmag.com/database-development/sql-server-65-cube-
ro...](http://sqlmag.com/database-development/sql-server-65-cube-rollup)

------
ryanmarsh
So does this mean I could use pg instead is SSAS for cube analysis?

~~~
notarget
SSAS and other cube (MOLAP) tools create persistent cubes as materialized
views. Databases that do ROLAP processing create "cubes on the fly" which
persist for the duration of the query.

If PG adopts a materialized view that supports controlled automatic
maintenance, then you'd have something similar to what the MOLAP tools do.

Note that MOLAP is a trap of sorts (no pun intended).

~~~
ryanmarsh
What makes MOLAP a trap? I'm only generally acquainted with cube analysis.

