Re: RE: IN or Exists --- performance issue

2003-06-04 Thread rgaffuri
PROTECTED] Subject: RE: IN or Exists --- performance issue Hi Listers I have a unique performance problem. As a general rule by oracle while writing SQL scripts EXISTS should be used in place of IN. As a general rule there is no general rule. Why do you want to use EXISTS if it goes

RE: IN or Exists --- performance issue

2003-06-04 Thread Kevin Toepke
I nearly alwayshave issues with blanket statements on performance. That includes the statement that EXISTS should be used in place of IN. If the IN performs better in the particular case, use it. If it doesn't perfom adiquately then, by all means, convert it to an EXISTS. And do the

Re: IN or Exists --- performance issue

2003-06-03 Thread rgaffuri
there is an in exists thread on asktom. Generally speaking exists is better if the sub-query will have a larger and most costly result set than the outer query. Its the other way around for 'in'. I may have them backward, though I think that is correct. From: Munish Bajaj [EMAIL PROTECTED]

RE: IN or Exists --- performance issue

2003-06-03 Thread Mark Leith
Munish, You are right, as a *general rule of thumb* EXISTS is *usually* faster than IN.. There can however be problems when an EXISTS is used to manipulate or select data from a very large table, where the row exists in a far smaller table, as it will read every row in the large table, and then

RE: IN or Exists --- performance issue

2003-06-03 Thread Lord, David - CSG
--_=_NextPart_001_01C329BC.79FDEA20 Content-Type: text/plain; charset=iso-8859-1 Munish I've got a funny feeling that this thing about using EXISTS rather than IN is a bit of a myth. I do a lot of this sort of thing and I find that almost invariably, an IN with a simple subquery is faster

RE: IN or Exists --- performance issue

2003-06-03 Thread Stephane Faroult
Hi Listers I have a unique performance problem. As a general rule by oracle while writing SQL scripts EXISTS should be used in place of IN. As a general rule there is no general rule. Why do you want to use EXISTS if it goes faster with IN ? EXISTS is mostly used with a correlated