The information in this article applies to:
SUMMARYWhen scoring a search or join clauses, the Sql Server optimizer uses the row and page estimates to arrive at the cost associated with using the index. The page estimate is the estimated number of pages that will need to be traversed in finding a matching row. The page estimates (costing x pages in trace(302) output) is used in estimating the cost of using the index. When there are no indexes being used, the cpages value will be the actual number of pages in the table. This value will be lower than the total number of pages in the table when a useful index exists and is being considered by the optimizer. Relevant portions of the trace(302,310) are used in this discussion. This is important because the total cost associated with using an index for a search argument or in evaluating the cost of a join permutation depends on the cpages value. MORE INFORMATION
Cost comparisons are done between the table scan cost and the estimated
cost of using the index. The cpages value contributes to this estimated
cost, and is affected by the number of levels in the index btree, which in
turn depends on the width and type of index, and number of rows and pages
in the table.
Cpages is also used to calculate logical page reads (lp in trace flag 310 output).
Keywords : kbusage SSrvGen |
Last Reviewed: April 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |