Steve,

Yes, they are basically two ways to remove the dermis from a feline. 

WHERE EXISTS (select * from othertable WHERE corelated clause) 

WHERE colname IN (sel colname from othertable WHERE same 
corelated clause)

There can be significant performance differences between the two for any 
given query. Neither method is always the winner over the other method, 
though.  It's always worth doing a timed test or two (with a near-production 
sized database that has been recently reloaded or reindexed).

Bill


On Thu, 12 Jun 2003 15:39:48 -0500, J. Stephen Wills wrote:

>Have anyone's thoughts meandered (perhaps needlessly and w/o 
justification) to the difference(s) between the use of an EXISTS-clause 
versus an IN-clause in a SELECT-statement?  This has begun to 
consume more of my available (mental) clock-ticks the past few days.  
Now, understand, I'm probably truly twisted as there is no task in my 
current work that requires me to use either approach ; so, it's nothing more 
than insane curiosity, idle minds/hands ...
> 
>Anyway, the reason I began to wonder is that when I've used correlated 
EXISTS-clauses or correlated IN-clauses, unless I recall mistakenly, the 
result-sets were equal.
> 
>Am I wrong or missing something?

Reply via email to