Subject | Re: [firebird-support] Re: Natural Plan when grouping by 5 indexed columns? |
---|---|
Author | Lele Gaifax |
Post date | 2007-02-01T21:52:50Z |
Adam wrote:
former is equivalent to
select DISTINCT a,b,c
from d
order by 1,2,3
ciao, lele.
>>> Why do you need to group by unless you have aggregates or a havingNot always, in particular when (a,b,c) is not be a "primary key"; the
>>> clause?
>> Because one is trying to view the dimension structure?
>
> It does not make sense though.
>
> select a,b,c
> from d
> group by 1,2,3
>
> is exactly the same as
>
> select a,b,c
> from d
> [order by 1,2,3]
>
former is equivalent to
select DISTINCT a,b,c
from d
order by 1,2,3
ciao, lele.