Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "Not in" subquery
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