Re: Optimizing a delete script
From: Jared Still <jared_at_valleynet.com>
Date: 1996/02/29
Message-ID: <4h4eg4$ms_at_alpine.valleynet.com>#1/1
);
Date: 1996/02/29
Message-ID: <4h4eg4$ms_at_alpine.valleynet.com>#1/1
chuckh_at_ix.netcom.com (Chuck Hamilton) wrote:
>delete from child1
> where col1 in (select col1 from parent where ref_date < '&&cutoff');
One thing to do is structure your statement to use 'exists' rather than 'in';
delete from child1 c
where exists
(
select null from parent p where ref_date < '&&cutoff' and p.col1 = c.col1
);
Jared Still, Oracle DBA
RxNet, Division of Value Health
"All opinions are mine, not my employers"
jared_at_valleynet.com
Received on Thu Feb 29 1996 - 00:00:00 CET