# Statistics Categories

+ By object types
  + Table statistics
  + Index statistics
  + Column statistics
+ By the level of detail, statistical information can be classified into three categories
  + Basic statistics
  + Primary statistics
  + Supplemental statistics

![`smart`](LoadStatistics01_aa_002_20231225.png)

------------------------------------------------------------------------------
Object statistics in TiDB are categorized into three levels based on their detail:

1. Basic statistics consume the least memory and include metrics such as row count, distinct values count in a column, and null values count in a column.
   
2. Primary statistics include histograms, TopN, and Count-Min Sketch for indexed columns.

3. Supplemental statistics encompass histograms, TopN, and Count-Min Sketch for non-indexed columns.

In TiDB, histograms approximate the distribution of data within specific table columns. They are crucial for estimating the selectivity of range predicates and interval queries.

TopN captures the most frequent values in a column or index, offering insight into frequency statistics or data skew.

Count-Min Sketch is a hash-based structure used by TiDB to estimate the results of equivalence queries.