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: Oracle SQL Condition Question...

Re: Oracle SQL Condition Question...

From: Ajay Kulkarni <ajay_at_ifu.net>
Date: 1998/04/23
Message-ID: <01bd6e56$d829c1e0$52e4e6d0@ifu.ifu.net>#1/1

To improve the processing time use the following query

insert into tab3
 select f1 from tab1
 minus
 select f2 from tab2

I am pretty sure this will give the same results and will run in a substantially smaller time.

Ajay
akulkar_at_ifu.net

> > I have 2 tables

 tab1 tab2
> > ==== ====

 ..     ..
 ..     ..

> > f1 f2
> > .. ..
> > .. ..
> >
> > Both the tables above contain approx. 60,000 Records
> > and have indexes on f1 and f2.
> >
> > I have an SQL which is the foll..
> >
> > Insert into tab3 ( select * from tab1 where tab1.f1 not in
> > (select distinct tab2.f2 from tab2));
> >
> > The problem is this SQL takes around 40-45 hours to execute...
> >
> > Am i missing something here...Or any Workarounds Possible...??
> >
Received on Thu Apr 23 1998 - 00:00:00 CDT

Original text of this message

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