Yep, EXISTS will virtually always be faster, usually MUCH faster, than a
correlated subquery, because a subquery is evaluated for EVERY ROW processed
by the outer query.

On Wed, Aug 26, 2009 at 12:43 AM, Mark Henderson <shadefro...@gmail.com>wrote:

>
> Brian Kotek wrote:
> >
> > WHERE NOT EXISTS should also work.
> >
>
> Yes it does, and I knew about that method when using NOT IN, as it was
> a simple change to my original working query. What I didn't know, but
> now do after some googling, is that NOT EXISTS means it uses an index
> in the subquery as opposed to a full table scan (which was my primary
> concern). Thanks Brian.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325745
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to