July 2010
Intermediate to advanced
840 pages
16h 33m
English
Optimizers are not always able to draw conclusions that a human being can draw. The more information contained in the query, the better the chance that the optimizer will be able to find an improved execution plan. For example, to JOIN three tables together on a common column, you might write:
SELECT * FROM Table1, Table2, Table3 WHERE Table2.common = Table3.common AND Table3.common = Table1.common;
Alternately, you might write:
SELECT * FROM Table1, Table2, Table3 WHERE Table1.common = Table2.common AND Table1.common = Table3.common;
Some optimizers will JOIN pairs of tables based on the equi-JOIN conditions in the WHERE clause in the order in which they appear. Let us assume that Table1 is a very ...
Read now
Unlock full access