Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Is there a faster way???

Is there a faster way???

From: Andy <abruskoNOabSPAM_at_binney-smith.com.invalid>
Date: Wed, 05 Apr 2000 09:11:07 -0700
Message-ID: <01334142.201a9c2e@usw-ex0106-046.remarq.com>


Hi,
I have the following query that I have written to delete all of the rows in a table if it finds a matching row (based upon 4 columns) in another table. The 1st table has a few hundred rows and the 2nd table has a few hundred thousand rows. The query is running for a very long time. Is there a more efficient way to code this? Here is the query:

Delete from Frt.Tld_data_in a
where a.frt_order in
(select frt_order from frt.freight b

 where a.frt_order = b.frt_order) and
a.bl in
(select bl from frt.freight b

 where a.bl = b.bl) and
a.pro in
(select pro from frt.freight b

 where a.pro = b.pro) and
(a.accessorial_rc = 'RPAY');

Thanks alot!
Andy

Received on Wed Apr 05 2000 - 11:11:07 CDT

Original text of this message

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