[thelist] MySQL oddness

Matt Warden mwarden at gmail.com
Wed Jan 30 17:27:04 CST 2008

On 1/30/08, Phil Turmel <pturmel-webdev at turmel.org> wrote:
> Here I disagree.  Projection is *defined* to exclude duplicates,
> per the set notation in the reference you supplied.

Phil, this is not the definition of projection; the lack of duplicates
has to do with the definition of a relation, which does not contain
duplicates. The divergence is actually between tables and relations --
as tables can contain duplicates -- not between the projection
operation. This is what I was describing when I was contesting the
assertion that projection is analogous to a group operation. It is

> Column removal by itself is at least cheap, probably
> free, and in many cases negative cost.  Duplicate row removal
> might be free, but is likely to be expensive.

This was not my contention. I am saying that there will be an extra
operation. I am not speaking to whether this has an overall gain or
loss. In my original email I mentioned that the largest gain would be
in the transfer of the data over the network. Obviously if you are not
transferring data you don't need, then there will likely be an overall

My only point is that listing the columns will cause an extra
operation, namely a projection, to occur. This may be relevant for
things like subqueries.

> I don't think it's a question of divergence.  I
> don't think SQL and relational algebra ever *converged* as you
> describe.

I am not sure what you mean by this. SQL is founded in relational
algebra. It was developed by Codd himself...

> Back to the points about wildcards (not all by me):  There are
> maintenance, robustness, and performance advantages to avoiding
> wildcarded column lists, particularly in distributed
> environments.

Without question!


Matt Warden
Cincinnati, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list