Re: Teach SELECT DISTINCT first!

From: Laconic2 <>
Date: Tue, 27 Apr 2004 10:33:00 -0400
Message-ID: <>

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. Received on Tue Apr 27 2004 - 16:33:00 CEST

Original text of this message