Re: Grammatical Inconsistencies
Date: Sat, 24 Apr 2004 10:02:55 -0400
Message-ID: <s5edneFPRdfE7hfd4p2dnA_at_comcast.com>
Tim,
> we might instead ask the question:
> `SELECT F.B FROM F, G WHERE F.A = G.C;'
> The logical _intersection_ is performed in the WHERE clause, and the
> projection is performed via the SELECT.
Just a minor quibble. If you really want the projection, you'll say
`SELECT DISTINCT F.B FROM F, G WHERE F.A = G.C;' SQL should have made "SELECT" default to "SELECT DISTINCT" instead of "SELECT ALL". The fact that people don't like SELECT DISTINCT for performance reasons, is something the optimizer should be able to deal with, not the SQL programmer.
In your example, if we can know from the constraints that SELECT ALL and SELECT DISTINCT will produce identical results, then the optimizer should be able to deduce that, and do the right thing. Received on Sat Apr 24 2004 - 16:02:55 CEST