FIX: Switching the Order of Tables in the FROM Clause Changes the Optimization (171879)
The information in this article applies to:
- Microsoft SQL Server 6.5 Service Pack 1 and later
This article was previously published under Q171879
BUG #: 15522 (WINDOWS: 6.5)
SYMPTOMS
Switching the order of tables in the FROM clause for some join queries may
result in a non-optimal execution of the query plan. In one scenario for a
two-table join, significant difference in the execution times was noted
between two identical queries that had the same WHERE clause, but had the
order of tables in the FROM clause switched.
This behavior was noted on the release and Service Pack 1 versions of SQL
Server 6.5.
WORKAROUND
For the Optimizer to use the optimal join order, compare the execution
times and plans for the query and place the tables that result in better
execution times in the FROM clause.
STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 6.5. This problem has been corrected in U.S. Service Pack 2 for
Microsoft SQL Server version 6.5. For more information, contact your
primary support provider.
Modification Type: | Major | Last Reviewed: | 10/3/2003 |
---|
Keywords: | kbBug kbfix kbProgramming kbSQLServ650bug KB171879 kbAudDeveloper |
---|
|