Subject Re: [ib-support] Are these statements equivalent
Author Jason Chapman (JAC2)
Seem semantically the same to me.

JAC
""Leyne, Sean"" <sleyne@...> wrote in message
news:66187D861C1747499BE1365B74E0369110B8D3@......
> All,
>
> I am reviewing a program which was originally created 10+ years ago.
> Some SQL statements which are executed are performing extremely poorly
> and I am trying to optimize them.
>
> Accordingly, I'd like some "2nd opinions" about the way I am restating
> the statements.
>
> The original statement reads:
>
> 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
>
>
> I can tell you that they both provide the same answer, for the database
> I'm working with.
>
> Does anyone think that the two statements ARE NOT equivalent?
>
>
> Sean
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>