Re: Teach SELECT DISTINCT first!
Date: 27 Apr 2004 13:41:26 -0700
"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).
if one wishes not to read it: Celko cites Codd and Date in arguing
dups. i concur. Received on Tue Apr 27 2004 - 22:41:26 CEST