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



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q255643
BUG #: 55589 (SQLBUG_70)

SYMPTOMS

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.

CAUSE

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.

WORKAROUND

Use optimizer hints to use loop joins.

STATUS

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.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB255643