Re: Forms Question : How to avoid IN operator in the WHERE CLAUSE

From: Bob Sauer <rsauer_at_census.gov>
Date: Thu, 19 Nov 1998 07:15:23 -0500
Message-ID: <36540BDB.B2A27D6B_at_census.gov>


You hve two things in your statement that will cause full table scans. Using EXISTS instead of IN will get rid of one of them. The LIKE operator will also cause a full table scan.

Bob

Raymond Siao wrote:

> Try using "exists" clause instead of the "IN" clause:
>
> e.g. select ??? from table1 where exists ( select ??? from tables2 where
> col1=col2 and col2 = 'XYZ' );
>
> Hope that it could help.
>
> Madhu Cherukuri wrote:
>
> > Hi,
> >
> > Does any body has some ideas about this question?
> >
> > I have a where clause which uses a sub-query and
> >
> > IN operator to perform the main query.
> >
> > Thsi is causing Full Table scan and I want to
> >
> > avoid it. Is there any workaround for this in the
> >
> > Forms?(Forms 4.5)
> >
> > Where clause is like this
> >
> > where col1 IN (select col2 from Table2 where col2 like 'XYZ')
> >
> > Col1 is from another table and has a relationship with col2 of Table2
> >
> > Thanks in advance
> >
> > Madhu Cherukuri
> >
> > -**** Posted from Supernews, Discussions Start Here(tm) ****-
> > http://www.supernews.com/ - Host to the the World's Discussions & Usenet
Received on Thu Nov 19 1998 - 13:15:23 CET

Original text of this message