Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Grammatical Inconsistencies

Re: Grammatical Inconsistencies

From: Laconic2 <laconic2_at_comcast.net>
Date: Sat, 24 Apr 2004 10:02:55 -0400
Message-ID: <s5edneFPRdfE7hfd4p2dnA@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 - 09:02:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US