Microsoft KB Archive/255643

From BetaArchive Wiki
Knowledge Base

FIX: Incorrect Costing Causes Other Joins to be Favored Over Loop Join

Article ID: 255643

Article Last Modified on 3/14/2006


  • Microsoft SQL Server 7.0 Standard Edition

This article was previously published under Q255643

BUG #: 55589 (SQLBUG_70)


In complex queries, loop join is not selected due to incorrect costing, which results in the use of non-optimal join mechanisms which then causes performance problems. In some cases, typically in a view, the query cannot be rewritten using optimizer hints.


The predicate cost was computed with respect to the row goal, but then the predicate cost was later added in to the rewind and rebind costs. If there are many rows and lots of rewinds or rebinds, the cost is added in many times. This results in non-optimal join mechanisms being favored by the optimizer.


Use optimizer hints to use loop joins.


Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.

Additional query words: slow suboptimal sub-optimal force join perf prob

Keywords: kbbug kbfix KB255643