Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Tue, 04 Mar 2003 14:31:19 +0200
Message-ID: <3E649C97.9080901_at_atbusiness.com>


Paul Vernon wrote:

 >FYI. DB2 does do some optimisation (I.e. does not join to S), but does not go

>the whole hog in it's rewritten SQL (see below)
>However it does set it's 'Early Out Flag' in the access plan on the join
>between P and SP, which would AKAIK have the same effect as the EXISTS check
>in the 'more fully' optimised SQL suggest above.
>

I agree. I think that "early out" flag means that it will stop as soon as it has found
one qualifying SP-row, so in essence it equates to the EXISTS-version.

Also the missing SORT implies that it does not have to eliminate duplicates.

But why does it do a HASH-join?

ps. I would have tried this myself but my DB2 trial license has expired :-(

regards,
Lauri Pietarinen Received on Tue Mar 04 2003 - 13:31:19 CET

Original text of this message