Re: Teach SELECT DISTINCT first!
Date: Wed, 28 Apr 2004 08:08:18 -0400
Thanks very much for posting this. It's worth reading.
"robert" <gnuoytr_at_rcn.com> wrote in message
> "Laconic2" <laconic2_at_comcast.net> wrote in message
> > 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
> > SQL had made an unfortunate choice in the meaning of "SELECT"
> > My thought is that, if SQL had originally made "SELECT" default to
> > DISTINCT" instead of "SELECT ALL", there would be less misunderstanding
> > the RDM than there is.
> > But I was declared "orthogonal".
> > Note that, when it came to "UNION" SQL defaulted to "UNION DISTINCT",
> > if you want "UNION ALL", you have to say "UNION ALL".
> > I claim, without proof, that a really good optimizer can tell, by
> > rules of logic, and perhaps more metadata than is now stored, when
> > ALL" and "SELECT DISTINCT" will produce the same result. If so, it
> > 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 Wed Apr 28 2004 - 14:08:18 CEST