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

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

Re: "Not in" subquery

From: joel garry <joel-garry_at_home.com>
Date: Wed, 06 Jun 2007 14:32:34 -0700
Message-ID: <1181165554.555244.326240@d30g2000prg.googlegroups.com>


On Jun 6, 2:06 pm, Amritha.Da..._at_gmail.com wrote:
> On Jun 6, 4:57 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
>
>
>
>
>
> > On Jun 6, 3:52 pm, Amritha.Da..._at_gmail.com wrote:
>
> > > On Jun 6, 4:47 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
>
> > > > On Jun 6, 3:43 pm, Amritha.Da..._at_gmail.com wrote:
>
> > > > > On Jun 6, 4:31 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
>
> > > > > > On Jun 6, 3:22 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.

See http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:953229842074

...
>
> Being a developer I can not have access to generate DDL.
> But As explained I will be executing this SQL through a stored
> procedure to update
> reason code for the qualified records in the sub query.
>
> Please advise.
>
> Thanks

Any developer should know how to check the plan for their code. See http://www.jlcomp.demon.co.uk/explain_1_i.html and http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:231814117467

Also see http://www.dbaoracle.net/readme-cdos.htm

jg

--
@home.com is bogus.
"I was repeatedly told I was not contagious, that I was not a threat
to anyone." - Andrew Speaker
Received on Wed Jun 06 2007 - 16:32:34 CDT

Original text of this message

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