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: Slow insert

Re: Slow insert

From: <sun_haibo_at_yahoo.com>
Date: Fri, 11 Dec 1998 08:19:20 GMT
Message-ID: <74qki8$26l$1@nnrp1.dejanews.com>


Hi,

This statement cause full scan for both tables. Please change to

insert into TABLEA
 select * from TABLEB b
 where b.KEY not in (select a.KEY from TABLEA a where a.key=b.key);

Regards

Hai Bo

In article <36706de7.154166_at_news.us.net>,   adizon_at_us.net (Lito Dizon) wrote:
> Why is this so slow? Slow meaning 10 hours. Ans the
> further it gets, the slower it gets.
>
> insert into TABLEA
> select * from TABLEB
> where KEY not in (select KEY from TABLEA )
>
> Both tables are indexed on KEY. TABLEA has 9000 rows
> while TABLE B has 12000 rows.
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Dec 11 1998 - 02:19:20 CST

Original text of this message

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