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: process long time query!

Re: process long time query!

From: Matthias Rogel <rogelREMOVE_at_THISweb.de>
Date: Tue, 28 Jan 2003 17:37:56 +0100
Message-ID: <b16bl5$ufvih$1@ID-86071.news.dfncis.de>


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

Original text of this message

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