Subject | Re: exisits(select *) vs exists(select pk) |
---|---|
Author | Adam |
Post date | 2005-08-02T23:44:05Z |
--- In firebird-support@yahoogroups.com, "Lutz Kutscher"
<lt_col_blair@y...> wrote:
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
<lt_col_blair@y...> wrote:
> Hi,Hi Lutz,
>
> 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
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