Subject | Re: [ib-support] Are these statements equivalent |
---|---|
Author | Ann W. Harrison |
Post date | 2003-02-10T17:24:05Z |
At 04:25 PM 2/9/2003 -0500, Leyne, Sean wrote:
optimize better as well.
Regards,
Ann
>The original statement reads:The second is certainly simpler and more "relational" - it should
>
> select avg(updates.col_decim)
> from updates
> where
> updates.col_key in
> (select updates.col_key
> from updates, hundred
> where hundred.col_key = updates.col_key
> and updates.col_decim > 980000000)
>
>My new statement reads:
>
> select avg(updates.col_decim)
> from updates
> join hundred ON hundred.col_key = updates.col_key
> where updates.col_decim > 980000000
optimize better as well.
Regards,
Ann