Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: query taking too much time to execute
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?
Ed's quite right about knowing one's data. However, if I were to hazard a guess, why not the following?
delete from ASSORTMENT
where ASSORTM != ( select min(ASSORTM)
from ASSORTMENT );
MIN() will only return the one value... Received on Wed Apr 26 2006 - 10:29:10 CDT