Subject Re: [firebird-support] group by or distinct
Author Ivan Prenosil
If you have index on field1, field2, field3,
then select with group by can use it,
select with distinct will not use it.
Which one is faster depends on distribution of your data,
so you have to try it yourself.
(The possibility to use index for distinct operator was added
into IB5, but removed from later versions ...)

Ivan



----- Original Message -----
From: "kaczy27" <akaczmarczyk@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, September 02, 2004 10:30 AM
Subject: [firebird-support] group by or distinct


> hello,
>
> what is faster in such case:
>
> select
> field1, field2, field3
> from
> table1
> group by
> field1, field2, field3;
>
> or
>
> select distinct
> field1, field2, field3
> from
> table1;
>
> CUIN Kaczy
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>