Re: Optimizing a delete script
From: <afischer_at_ea.com>
Date: 1996/03/01
Message-ID: <4h7jie$gg8_at_viper.ea.com>#1/1
Date: 1996/03/01
Message-ID: <4h7jie$gg8_at_viper.ea.com>#1/1
jared_at_valleynet.com (Jared Still) wrote:
>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
> );
A correlated "Exists" would be faster than "In"? Hmmmm..... seems doubtful to me... Received on Fri Mar 01 1996 - 00:00:00 CET