Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: NOT IN performance problem

Re: NOT IN performance problem

From: Nils Höglund <nils_at_naqua.se>
Date: Tue, 25 Jun 2002 10:17:13 -0800
Message-ID: <F001.004872B7.20020625101713@fatcity.com>

> I'm not sure what you want since your query doesn't correspond to what
> you are saying you want. Therefore no sample just a general statement,
> use minus.
>
> > SELECT personid FROM phonenumber WHERE personid NOT IN (
> > SELECT personid FROM person);
> >
> > I'm wondering how I could restructure or rewrite my query ("who doesn't have
> > any phoinenumbers?") to run faster,
> > or if there is anything else I can do to optimize the query?

I'm sorry. I miss-wrote.

It should be:

SELECT personid FROM person WHERE personid NOT IN (

   SELECT personid FROM phonenumber)    

Thanks!

-- 
/Nils Höglund, Naqua KB

E-mail:         nils_at_naqua.se
Web:            http://www.naqua.se/
Home Phone:     +46 (0)18  30 09 19
Cellular Phone: +46 (0)736 51 74 58
Address:        Nya Valsätrav. 26 B
                SE-756 46
                Uppsala, Sweden
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?Q?Nils_H=F6glund?=
  INET: nils_at_naqua.se

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jun 25 2002 - 13:17:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US