Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Slow insert
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