The information in this article applies to:
BUG #: 54452 (SQLBUG_70) SYMPTOMSQueries with multiple OR clauses, based on the fields in a composite index, may display slow execution times as the optimizer does not use the index for the query, but instead uses a scan. This only happens when the query is executed from within a stored procedure, or executed through an ODBC application. WORKAROUND
Here are five options you may use to avoid this problem:
STATUSMicrosoft has confirmed this to be a problem in SQL Server version 7.0. MORE INFORMATIONMicrosoft Access applications with linked tables may experience this problem as Microsoft Access fetches 10 rows at a time based on the primary key. For example, if the primary key of a table is on columns a and b, you will see the following type of query sent to SQL Server when opening the linked table:
If this is sent to SQL Server as a straight SQL query, the optimizer chooses to use the index and performance is as expected. However, since Microsoft Access uses SQLPrepare() for the query, if the "Generate Stored Procedures for Prepared Statements" option is set ON for the 3.6 and earlier SQL Server ODBC driver, the query executes as a temporary stored procedure. When using the 3.7 driver the prepare\execute model is used, which also does not use the index.
Additional query words: slow poor performance hang
Keywords : kbSQLServ700 kbSQLServ700bug |
Last Reviewed: December 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |