package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
AdjustRowCountForIndexScanByLimit will adjust the row count for table scan by limit.
AdjustRowCountForTableScanByLimit will adjust the row count for table scan by limit.
AvgColSize is the average column size of the histogram.
AvgColSizeChunkFormat is the average column size of the histogram.
AvgColSizeDataInDiskByRows is the average column size of the histogram.
CalcTotalSelectivityForMVIdxPath calculates the total selectivity for the given partial paths of an MV index merge path.
ColumnEqualRowCount estimates the row count where the column equals to value.
ColumnGreaterRowCount estimates the row count where the column greater than value.
EstimateColsDNVWithMatchedLenFromUniqueIDs is similar to EstimateColsDNVWithMatchedLen, but it receives UniqueIDs instead of Columns.
EstimateColsNDVWithMatchedLen returns the NDV of a couple of columns.
EstimateColumnNDV computes estimated NDV of specified column using the original histogram of `DataSource` which is retrieved from storage(not the derived one).
EstimateFullJoinRowCount estimates the row count of a full join.
GetAvgRowSize computes average row size for given columns.
GetAvgRowSizeDataInDiskByRows computes average row size for given columns.
GetColumnRowCount estimates the row count by a slice of Range.
GetIndexAvgRowSize computes average row size for a index scan.
GetRowCountByColumnRanges estimates the row count by a slice of Range.
GetRowCountByIndexRanges estimates the row count by a slice of Range.
GetRowCountByIntColumnRanges estimates the row count by a slice of IntColumnRange.
GetSelectivityByFilter try to estimate selectivity of expressions by evaluate the expressions using TopN, Histogram buckets boundaries and NULL.
GetTableAvgRowSize computes average row size for a table scan, exclude the index key-value pairs.
GetUsableSetsByGreedy will select the indices and pk used for calculate selectivity by greedy algorithm.
PseudoAvgCountPerValue gets a pseudo average count if histogram not exists.
Selectivity is a function calculate the selectivity of the expressions on the specified HistColl.
# Constants
The type of the StatsNode.
The type of the StatsNode.
The type of the StatsNode.
SelectionFactor is the factor which is used to estimate the row count of selection.
# Variables
CollectFilters4MVIndex and BuildPartialPaths4MVIndex are for matching JSON expressions against mv index.
CollectFilters4MVIndex and BuildPartialPaths4MVIndex are for matching JSON expressions against mv index.
GetTblInfoForUsedStatsByPhysicalID get table name, partition name and TableInfo that will be used to record used stats.