LWN.net Logo

How to Misuse SQL's FROM Clause (O'Reilly)

Stéphane Faroult looks at common problems with the SQL FROM clause on O'Reilly. "It may seem surprising to state it so, but the FROM clause of SQL statements seems to be one of the most often misused parts of SQL queries. Misused? How is that possible? We put into the FROM clause all the tables to join together in a query, don't we? Well, well, well. Not quite. At the risk of sounding pedantic, perhaps a bit of (applied) theory would be welcome."
(Log in to post comments)

How to Misuse SQL's FROM Clause (O'Reilly)

Posted Oct 8, 2004 14:15 UTC (Fri) by gc (guest, #24112) [Link]

Misused? Author rather talks about optimizing queries (and actually author even says that the optimizer may sometimes rewrite the query back). Am I the only one to find the "natural" version more readable and more logical? Author may optimize code, but he should state that. Optimized code is not always the best, particularly for not critical queries. In which case maintainable code is better.

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds