Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Group By Questions..

Re: Group By Questions..

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Sat, 02 Oct 1999 07:00:12 GMT
Message-ID: <6EC14873F507D3119B8C0090273C4349087183@jdasoftware.com>


In my opinion the result should be the same ? It better be. Using indexes you get the best performance on the same index expresion as
the grouping
Without indexes, performance is best if you start with the smallest expected
result set from left to right.
Ted

Jimmy wrote:

> Hello all,
>
> Assume I have a table with column A, B, C and D.
>
> I wonder the following SQL statements will produce the same
results:
>
> i) select B, C, D, avg(A) from AAA group by B, C, D;
> ii) select B, C, D, avg(A) from AAA group by B, D, C;
> iii) select B, C, D, avg(A) from AAA group by C, B, D;
> ....
>
> i.e. does the order of group by clause affect the final result (or
> performance, if any) of the SQL statement? Anyone knows white papers
or
> documents discussing this issue?
>
> Thanks,
> Jimmy


Received on Sat Oct 02 1999 - 02:00:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US