| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: process long time query!
Cuong Hoang wrote:
> I tried to run query but it takes forever (each table has 1 miillon rows).
> Do you know any way to rewrite this query to make faster?
>
> "create table NO_BASE_DATE_PRICE as
> select ItemCode, IndexCode, ItemBaseDate
> from CELL_MAP
> where (ItemCode, IndexCode, ItemBaseDate)
> not in (select ItemCode, IndexCode, IndexRefMonth
> from CALC_PRICE);"
> Thanks,
> CH
>
>
try a truncate or two beforehand -
then there are not so many rows left :-)
no, to be serious: did U ever hear of indexes ? - are there some indexes on your tables ?
also: don't use "not in" - use "minus" instead .
good luck,
matthias
Received on Tue Jan 28 2003 - 10:37:56 CST
![]() |
![]() |