Queries B & C are NOT the same. Instead, A and C are equivalents. Query B will give the worst performance because the LEFT function on the only column in the WHERE clause is going to preclude the use of any indexes. It is probably that there will be an index on the ID columns, though, so both A and C are going to take advantage of that index and then check the LEFT(AuthorName, 1) constraint..
As to whether the first "half" of Query A will perform before anything else or before the constraint being applied, that all depends upon the query engine and, absent an indication as to which engine is involved (e.g. Oracle, mySQL, Teradata), one cannot make a definitive statement of regarding that aspect. What one can say, though, is that it is probably that Query A will result in an index seek rather than a table (or, ven, an index) scan, which is what the Query B will cause.
Also, one can say that Query A conforms to the newer "rules" for writing "well formed and well formatted" queries. ;-)





by: RiteshShahPosted on 2009-07-12 at 20:10:08ID: 24836935
well, there is not performance difference between query B and query C. both are same, just belongs to different SQL syntax. but query A will have faster performance as your condition will executed even before WHERE clause, FROM is a close which used to execute first so ultimately you are passing less records to other processes in query execution flow.