Path: newssvr20.news.prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!news.glorb.com!postnews1.google.com!not-for-mail
From: gnuoytr@rcn.com (robert)
Newsgroups: comp.databases.theory
Subject: Re: Teach SELECT DISTINCT first!
Date: 27 Apr 2004 13:41:26 -0700
Organization: http://groups.google.com
Lines: 28
Message-ID: <da3c2186.0404271241.a427ea5@posting.google.com>
References: <NeGdnUf-jdgqcxbdRVn-vA@comcast.com> <pan.2004.04.27.13.45.51.536085@dutra.fastmail.fm> <XJadna5ZoOR58xPdRVn-jg@comcast.com>
NNTP-Posting-Host: 20.137.30.50
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1083098486 16894 127.0.0.1 (27 Apr 2004 20:41:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 27 Apr 2004 20:41:26 +0000 (UTC)
Xref: newssvr20.news.prodigy.com comp.databases.theory:26022

"Laconic2" <laconic2@comcast.net> wrote in message news:<XJadna5ZoOR58xPdRVn-jg@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.
