Re: Patch for adding DATACUBE operator

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "sumit" <sumit(at)gdit(dot)iiit(dot)net>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for adding DATACUBE operator
Date: 2003-06-30 11:09:54
Message-ID: 001d01c33ef8$231cfe20$6401a8c0@DUNSLANE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


I'm curious to know why you implement this as a union of queries, since,
unless my understanding is badly awry, you have all the information
necessary for the ALL rows by running the base (ie. without cube) query, Why
not just run that query and then add the ALL rows from examining the
results? ISTM that would be more efficient, since the summary table is in
most real world situations likely to be far, far smaller than the base
table.

andrew

----- Original Message -----
From: "sumit" <sumit(at)gdit(dot)iiit(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Sent: Monday, June 30, 2003 6:04 AM
Subject: [PATCHES] Patch for adding DATACUBE operator

>
> Hi!
>
> We have added the CUBE operator for PostgreSQL. Please find the
> attached patch.
>
> Another thing to note is that the file datacube.c should
> be placed in src/backend/tcop/ and datacube.h should be in src/include.
>
> The syntax of the query is
>
> SELECT <field list><aggregate list>
> INTO <destination table>
> FROM <table expression>
> WHERE <search condition>
> GROUP BY <aggregate list>
> HAVING <search condition>
> WITH CUBE;
>
> An example along with the output is provided in the
> README.datacube file. Kindly have a look. Let us know your response.
>
> Srikanth M
> Sumit Kumar Mukherjee
>

----------------------------------------------------------------------------
----

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message sumit 2003-06-30 11:42:54 Re: Patch for adding DATACUBE operator
Previous Message sumit 2003-06-30 10:04:11 Patch for adding DATACUBE operator

Browse pgsql-patches by date

  From Date Subject
Next Message Dennis Björklund 2003-06-30 11:32:29 svedish trans
Previous Message sumit 2003-06-30 10:04:11 Patch for adding DATACUBE operator