Michael L John (12/17/2015)
GilaMonster (12/17/2015)
MMartin1 (12/17/2015)
Does the SELECT 1 provide a big performance gain or just prevents a call to the disk that may get delayed?Neither. It's there to show readers that EXISTS doesn't care about column names. You could do EXISTS (SELECT 1/0 ...) if you wanted.
Someone who shall remain nameless had a good blog post on this subject!
http://sqlinthewild.co.za/index.php/2011/04/05/to-top-or-not-to-top-an-exists/#more-988
Great article, and informative. Thank you both for that.
----------------------------------------------------