BUG: SQL Server Optimizer Chooses Bad Plan with Self Joined Tables (269883)
The information in this article applies to:
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q269883
BUG #: 57365
Bug #: 235842
SYMPTOMS
If a query joins two tables where the second table performs self joins, the SQL Server query optimizer may fail to pick an optimal plan.
CAUSE
Without optimizer hints, SQL Server uses a hash match root/inner join query plan that is exponentially slower than using a nested loop/inner join plan.
WORKAROUND
To work around this behavior:
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbBug kbpending KB269883 |
---|
|