I don't think either is faster, because the engine is smart enough to know
that it's not actually going to return those columns, only a single value
stating whether such a row exists.
I typically use IF EXISTS (SELECT 1 FROM ...) not for performance reasons,
just a habit to make it easy to identify subqueries on casual inspection
that are definitely not going to return results.
--
http://www.aspfaq.com/ (Reverse address to reply.)
"Jean-Nicolas BERGER" <j-n.enlevezmoi.berger@club-internet.fr> wrote in
message news:OPluBxCIFHA.2976@TK2MSFTNGP15.phx.gbl...
[quoted text, click to view] > I'm wondering what's the fastest solution (if one is faster than the
orther)
> between :
>
> if exists (select * from MyTable Where ...)
>
> and
>
> if exists (select Null from MyTable Where ...)
>
> Thx a lot for your answers.
> JN.
>
>