Knowledge Base

BUG: Optimizer May Ignore Index on Decimal or Numeric Column

Article ID: 197241

Article Last Modified on 10/16/2003


APPLIES TO


This article was previously published under Q197241
BUG #: 17851 (SQLBUG_65)

SYMPTOMS

The query optimizer will not use an index on a decimal or a numeric column if the precision of the column does not match exactly the argument used in the WHERE clause for that column.

WORKAROUND

To work around this problem, ensure that the arguments used in the WHERE clause match the scale of the column exactly.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.

MORE INFORMATION

This problem is most often noticed in situations where the column is specified with a scale of 0, because the argument in the WHERE clause will need to be specified with a decimal following the number (for example, "10." which is more often submitted as "10" or "10.0").

Additional query words: arg param parameter

Keywords: kbbug kbpending KB197241