MySQL 8.0.40
Source Code Documentation
n_diff_data_t Struct Reference

Input data that is used to calculate dict_index_t::stat_n_diff_key_vals[] for each n-columns prefix (n from 1 to n_uniq). More...

Public Attributes

ulint level
 Index of the level on which the descent through the btree stopped. More...
 
uint64_t n_recs_on_level
 Number of records on the level where the descend through the btree stopped. More...
 
uint64_t n_diff_on_level
 Number of different key values that were found on the mid level. More...
 
uint64_t n_leaf_pages_to_analyze
 Number of leaf pages that are analyzed. More...
 
uint64_t n_diff_all_analyzed_pages
 Cumulative sum of the number of different key values that were found on all analyzed pages. More...
 
uint64_t n_external_pages_sum
 Cumulative sum of the number of external pages (stored outside of the btree but in the same file segment). More...
 

Detailed Description

Input data that is used to calculate dict_index_t::stat_n_diff_key_vals[] for each n-columns prefix (n from 1 to n_uniq).

Member Data Documentation

◆ level

ulint n_diff_data_t::level

Index of the level on which the descent through the btree stopped.

level 0 is the leaf level. This is >= 1 because we avoid scanning the leaf level because it may contain too many pages and doing so is useless when combined with the random dives - if we are to scan the leaf level, this means a full scan and we can simply do that instead of fiddling with picking random records higher in the tree and to dive below them. At the start of the analyzing we may decide to do full scan of the leaf level, but then this structure is not used in that code path.

◆ n_diff_all_analyzed_pages

uint64_t n_diff_data_t::n_diff_all_analyzed_pages

Cumulative sum of the number of different key values that were found on all analyzed pages.

◆ n_diff_on_level

uint64_t n_diff_data_t::n_diff_on_level

Number of different key values that were found on the mid level.

◆ n_external_pages_sum

uint64_t n_diff_data_t::n_external_pages_sum

Cumulative sum of the number of external pages (stored outside of the btree but in the same file segment).

◆ n_leaf_pages_to_analyze

uint64_t n_diff_data_t::n_leaf_pages_to_analyze

Number of leaf pages that are analyzed.

This is also the same as the number of records that we pick from the mid level and dive below them.

◆ n_recs_on_level

uint64_t n_diff_data_t::n_recs_on_level

Number of records on the level where the descend through the btree stopped.

When we scan the btree from the root, we stop at some mid level, choose some records from it and dive below them towards a leaf page to analyze.


The documentation for this struct was generated from the following file: