INF: Search Arguments That Determine Distribution Page Usage (169642)
The information in this article applies to:
- Microsoft SQL Server 6.0
- Microsoft SQL Server 6.5
This article was previously published under Q169642 SUMMARY
In determining the existence of useful indexes to resolve a query, SQL
Server looks for the search arguments in the query. Search arguments are
the arguments in the WHERE clause of a query that help to specify a
condition to restrict the result set returned by the query. It is necessary
that the arguments in the WHERE clause are of the form "column operator
constant". If indexes exist on these columns, the SQL Server optimizer can
estimate the selectivity of the index and thereby decide whether or not to
use it.
It is desired that the optimizer estimate search argument selectivity based
on the distribution information available in the distribution page. Other
methods of determining index selectivity for a search argument include
using index densities and magic density. Magic density is an estimate of
the search argument selectivity that can be used when density or statistics
on the distribution page cannot be used. It estimates 10 percent of the
rows match for an equality comparison, 25 percent for a between comparison,
and 33 percent for greater than, less than, greater than or equal to, and
less than or equal to comparisons.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbinfo kbusage KB169642 |
---|
|