Microsoft KB Archive/282984

= BUG: Multiple OR Clauses Combined with Non-selective Criteria May Result in Slower Plan =

Article ID: 282984

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q282984



BUG #: 351567 (SHILOH_bugs)



SYMPTOMS
A query that has multiple OR clauses and fairly non-selective search arguments may result in an execution plan that yields slower performance on a computer that is running SQL Server 2000 than on a computer that is running Microsoft SQL Server 7.0.



CAUSE
An incorrect cardinality estimate is being made.



WORKAROUND
Use a covering index for the query.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.



MORE INFORMATION
Here is one example where the problem may occur given non-selective data (meaning few unique values for Column2): SELECT E.Column1 FROM ExampleTable E WHERE (E.Column2 = 'ABCD')              OR       (E.Column2 = 'EFGH' and E.Column3 = 'IJ')  OR       (E.Column2 = 'KLM'  and E.Column4 = 'NOP')

Additional query words: cardinality performance slow worse speed plan inequality non-equality

Keywords: kbbug kbpending KB282984

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.