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: query taking too much time to execute

Re: query taking too much time to execute

From: Ed Prochak <edprochak_at_gmail.com>
Date: 23 Apr 2006 15:31:27 -0700
Message-ID: <1145831487.791569.83530@i39g2000cwa.googlegroups.com>

Kuldeep wrote:
> delete from ASSORTMENT
> where ASSORTM not in ( select min(ASSORTM)
> from ASSORTMENT
> group by ASSORTM2 )
>
> This query is teking too musc time to execute
>
> In ASSORTMENT there are 1,50,000 records
>
> somebdy has solution over it?

First rule of performance improvement: Know thy data.

However since you post no sample data, no table definitions, and no explain plan, giving advice on this one is tough. THe solution is going to depend on your data. I will suggest you consider other ways of writing the query than using NOT IN. (Options include for example a correlated NOT EXISTS clause.)

HTH,
  ed Received on Sun Apr 23 2006 - 17:31:27 CDT

Original text of this message

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