I have just been reading
How To Misuse SQL's From Clause (thanks to Rudy who pointed it it out on his website
r937.com).
It makes me go "hmm". It says "...this is a very bad query; it's logically flawed" - well no, actually I don't agree with that. Logically, the query is just perfect. However, it is true that a DBMS with a less than perfect optimizer might not recognize that the query can be transformed into one with a correlated subquery, which may be faster to process.
But, dammit, the whole point of SQL is that we define
what we want, not
how the DBMS should go about getting it. That's what the optimizer is for! Why should we have to waste our time re-phrasing our queries when the optimizer should be quite capable of doing that itself (by following the algorithm given in the article).
I don't think I'm beaing unreasonable here!
