Skip to content

Commit 5729e19

Browse files
author
PRMerger6
authored
Merge pull request #4046 from pmasl/patch-34
Update statistics.md
2 parents dda2d0a + b880fb1 commit 5729e19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docs/relational-databases/statistics/statistics.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ For each histogram step above:
7373
#### Density Vector
7474
**Density** is information about the number of duplicates in a given column or combination of columns and it is calculated as 1/(number of distinct values). The query optimizer uses densities to enhance cardinality estimates for queries that return multiple columns from the same table or indexed view. The density vector contains one density for each prefix of columns in the statistics object.
7575

76+
> [!NOTE]
77+
> Frequency is information about the occurrence of each distinct value in the first key column of the statistics object, and is calculated as row count * density. A maximum frequency of 1 can be found in columns with unique values.
78+
7679
For example, if a statistics object has the key columns `CustomerId`, `ItemId` and `Price`, density is calculated on each of the following column prefixes.
7780

7881
|Column prefix|Density calculated on|

0 commit comments

Comments
 (0)