Re: Teach SELECT DISTINCT first!

From: robert <gnuoytr_at_rcn.com>
Date: 27 Apr 2004 13:41:26 -0700
Message-ID: <da3c2186.0404271241.a427ea5_at_posting.google.com>


"Laconic2" <laconic2_at_comcast.net> wrote in message news:<XJadna5ZoOR58xPdRVn-jg_at_comcast.com>...
> Thanks. I didn't know that about Date pontificating. I don't read that
> much Date.
>
> That's really what I was driving at, a little while ago, when I said that
> SQL had made an unfortunate choice in the meaning of "SELECT"
>
> My thought is that, if SQL had originally made "SELECT" default to "SELECT
> DISTINCT" instead of "SELECT ALL", there would be less misunderstanding of
> the RDM than there is.
>
> But I was declared "orthogonal".
>
> Note that, when it came to "UNION" SQL defaulted to "UNION DISTINCT", and
> if you want "UNION ALL", you have to say "UNION ALL".
>
> I claim, without proof, that a really good optimizer can tell, by using
> rules of logic, and perhaps more metadata than is now stored, when "SELECT
> ALL" and "SELECT DISTINCT" will produce the same result. If so, it can
> skip a step, and thereby speed things up.\

i'm way too lazy to type all this in (or take credit for it).

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=c0d87ec0.0202240850.428d7b88%40posting.google.com&rnum=12&prev=/groups%3Fq%3D%252B%2522select%2Bdistinct%2522%2B%252Bdate%2B%2Bgroup:comp.databases.theory%26start%3D10%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26group%3Dcomp.databases.theory%26selm%3Dc0d87ec0.0202240850.428d7b88%2540posting.google.com%26rnum%3D12

if one wishes not to read it: Celko cites Codd and Date in arguing against
dups. i concur. Received on Tue Apr 27 2004 - 22:41:26 CEST

Original text of this message