The information in this article applies to:
SYMPTOMSA SELECT query containing an ORDER BY DESC clause can sometimes cause a high number of logical reads in SQL Server 6.0. CAUSE
This can occur if the optimizer chooses to process the query by using an
index on the ordered column and the WHERE clause of the query includes a
range search such as the following:
You can determine whether the optimizer has chosen to use an index by using the SET SHOWPLAN ON command and viewing the showplan output as documented in Chapter 23 of the SQL Server "Administrator's Companion." You can view the number of logical reads for the query by using the SET STATISTICS IO ON command. WORKAROUND
Restructure the query to use an intermediate temporary table such as
the following:
Note that this workaround should only be necessary in rare circumstances. Testing should be done to determine if the workaround uses fewer logical reads than the original query in your environment. STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider. Additional query words: sql6 performance
Keywords : kbprg SSrvProg SSrvTran_SQL kbbug6.50 kbbug6.00 kbfix6.50.sp2 |
Last Reviewed: March 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |