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

Home -> Community -> Usenet -> c.d.o.misc -> Re: "Not in" subquery

Re: "Not in" subquery

From: William Robertson <williamr2019_at_googlemail.com>
Date: Fri, 08 Jun 2007 01:07:57 -0700
Message-ID: <1181290077.756336.266350@q75g2000hsh.googlegroups.com>


On Jun 6, 9:21 pm, Amritha.Da..._at_gmail.com wrote:
> Hello,
>
> Is there any alternative query to the below one?
>
> update RTable set Reason = "XYZ"
> Where FKey = 1234
> and SFKey = 1
> and Reason Is Null
> and F_ID not in ( Select F_ID from RTable
> Where FKey = 1234
> and SFKey = 1
> and TO_NUMBER(REL_CD) = 1
> and Reason Is Null);
>
> "not in" in the above query is taking alot of time and it is timing
> out.
>
> Please Advise.
>
> Thanks

Is rtable.f_id a nullable column? Does the execution plan show a FILTER operation? You could try adding
AND f_id IS NOT NULL to the subquery. Received on Fri Jun 08 2007 - 03:07:57 CDT

Original text of this message

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