Subject Re: exisits(select *) vs exists(select pk)
Author Adam
--- In firebird-support@yahoogroups.com, "Lutz Kutscher"
<lt_col_blair@y...> wrote:
> Hi,
>
> is there a difference in execution speed whether I use
> exists(select * from Tb where PK='value')
> or
> exists(select PK from Tb where PK='value') ?
>
> Thanks

Hi Lutz,

If there is any measurable difference, then the following should be
even faster.

exists(select 1 from Tb where PK='value') ?

I imagine it will not be measurable because your criteria will use an
index with perfect selectivity.

:)

Adam