FIX: Query Plan Inconsistent If Search Value > Last StepLast reviewed: April 30, 1997Article ID: Q134822 |
The information in this article applies to:
SYMPTOMSThe Microsoft SQL Server version 6.0 query optimizer may sometimes choose to use an index and sometimes choose to do a table scan for the same query on the same data with the same distribution statistics.
CAUSEThe query optimizer incorrectly calculates the cost of using an index when the query WHERE clause contains a search value that is greater than the largest distribution step for a given index, but less than the largest value in the table for the indexed column. Even if the above conditions are met, the problem is still unlikely to occur with most queries. If you suspect this problem is occurring on a slow-running query, you should take other troubleshooting steps first, including running the UPDATE STATISTICS statement, examining the query's showplan output, and examining the table/index design as described in Knowledge Base article Q110352 - "INF: Optimizing SQL Server Performance."
WORKAROUNDUse optimizer hints to force a given query plan.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem was corrected in Service Pack 1 for SQL Server version 6.0. For more information, contact your primary support provider.
|
Additional query words: sql6 optimization performance
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |