Versions in this module Expand all Collapse all v7 v7.0.4 Jan 30, 2023 v7.0.2 Jan 30, 2023 v7.0.1 Jan 30, 2023 v7.0.0 Jan 30, 2023 Changes in this version + const AnalyzeFailed + const AnalyzeFinished + const AnalyzeFlag + const AnalyzePending + const AnalyzeRunning + const ColType + const EmptyBucketSize + const EmptyHistogramSize + const EmptyReservoirSampleItemSize + const EmptySampleItemSize + const EmptyScalarSize + const IndexType + const MaxErrorRate + const MaxSampleValueLength + const PkType + const PseudoRowCount + const PseudoVersion + const Version0 + const Version1 + const Version2 + var ErrQueryInterrupted = dbterror.ClassExecutor.NewStd(mysql.ErrQueryInterrupted) + var FeedbackProbability = atomic.NewFloat64(0) + var HistogramNeededItems = neededStatsMap + var MaxNumberOfRanges = 20 + var MaxQueryFeedbackCount = atomic.NewInt64(1 << 9) + var RatioOfPseudoEstimate = atomic.NewFloat64(0.7) + func BuildHistAndTopN(ctx sessionctx.Context, numBuckets, numTopN int, id int64, ...) (*Histogram, *TopN, error) + func CETraceExpr(sctx sessionctx.Context, tableID int64, tp string, expr expression.Expression, ...) + func CETraceRange(sctx sessionctx.Context, tableID int64, colNames []string, ...) + func CMSketchAndTopNFromProto(protoSketch *tipb.CMSketch) (*CMSketch, *TopN) + func CMSketchToProto(c *CMSketch, topn *TopN) *tipb.CMSketch + func CheckAnalyzeVerOnTable(tbl *Table, version *int) bool + func CollectFeedback(sc *stmtctx.StatementContext, q *QueryFeedback, numOfRanges int) bool + func ConvertDatumsType(vals []types.Datum, ft *types.FieldType, loc *time.Location) error + func DecodeCMSketchAndTopN(data []byte, topNRows []chunk.Row) (*CMSketch, *TopN, error) + func DecodeFeedback(val []byte, q *QueryFeedback, c *CMSketch, t *TopN, ft *types.FieldType) error + func DropEvicted(item TableCacheItem) + func EncodeCMSketchWithoutTopN(c *CMSketch) ([]byte, error) + func EncodeFMSketch(c *FMSketch) ([]byte, error) + func EncodeFeedback(q *QueryFeedback) ([]byte, error) + func ExprToString(e expression.Expression) (string, error) + func FMSketchToProto(s *FMSketch) *tipb.FMSketch + func FindPrefixOfIndexByCol(cols []*expression.Column, idxColIDs []int64, cachedPath *planutil.AccessPath) []*expression.Column + func GetIndexPrefixLens(data []byte, numCols int) (prefixLens []int, err error) + func GetMergedTopNFromSortedSlice(sorted []TopNMeta, n uint32) (*TopN, []TopNMeta) + func GetOrdinalOfRangeCond(sc *stmtctx.StatementContext, ran *ranger.Range) int + func GetPseudoRowCountByColumnRanges(sc *stmtctx.StatementContext, tableRowCount float64, ...) (float64, error) + func HistogramEqual(a, b *Histogram, ignoreID bool) bool + func HistogramToProto(hg *Histogram) *tipb.Histogram + func IsAnalyzed(flag int64) bool + func MergePartTopN2GlobalTopN(loc *time.Location, version int, topNs []*TopN, n uint32, hists []*Histogram, ...) (*TopN, []TopNMeta, []*Histogram, error) + func MergeTopN(topNs []*TopN, n uint32) (*TopN, []TopNMeta) + func NewCMSketchAndTopN(d, w int32, sample [][]byte, numTop uint32, rowCount uint64) (*CMSketch, *TopN, uint64, uint64) + func NewTopnStatsMergeWorker(taskCh <-chan *TopnStatsMergeTask, respCh chan<- *TopnStatsMergeResponse, ...) *topnStatsMergeWorker + func ResetAnalyzeFlag(flag int64) int64 + func RowSamplesToProto(samples WeightedRowSampleHeap) []*tipb.RowSample + func RowToDatums(row chunk.Row, fields []*ast.ResultField) []types.Datum + func SampleCollectorToProto(c *SampleCollector) *tipb.SampleCollector + func SplitFeedbackByQueryType(feedbacks []Feedback) ([]Feedback, []Feedback) + func SupportColumnType(ft *types.FieldType) bool + func UpdateCMSketchAndTopN(c *CMSketch, t *TopN, eqFeedbacks []Feedback) (*CMSketch, *TopN) + func ValueToString(vars *variable.SessionVars, value *types.Datum, idxCols int, ...) (string, error) + type AnalyzeJob struct + DBName string + EndTime time.Time + ID *uint64 + JobInfo string + PartitionName string + Progress AnalyzeProgress + StartTime time.Time + TableName string + type AnalyzeProgress struct + func (p *AnalyzeProgress) GetDeltaCount() int64 + func (p *AnalyzeProgress) GetLastDumpTime() time.Time + func (p *AnalyzeProgress) SetLastDumpTime(t time.Time) + func (p *AnalyzeProgress) Update(rowCount int64) (dumpCount int64) + type AnalyzeResult struct + Cms []*CMSketch + Fms []*FMSketch + Hist []*Histogram + IsIndex int + TopNs []*TopN + type AnalyzeResults struct + Ars []*AnalyzeResult + BaseCount int64 + BaseModifyCnt int64 + Count int64 + Err error + ExtStats *ExtendedStatsColl + Job *AnalyzeJob + Snapshot uint64 + StatsVer int + TableID AnalyzeTableID + type AnalyzeTableID struct + PartitionID int64 + TableID int64 + func (h *AnalyzeTableID) Equals(t *AnalyzeTableID) bool + func (h *AnalyzeTableID) GetStatisticsID() int64 + func (h *AnalyzeTableID) IsPartitionTable() bool + func (h *AnalyzeTableID) String() string + type BernoulliRowSampleCollector struct + SampleRate float64 + func NewBernoulliRowSampleCollector(sampleRate float64, totalLen int) *BernoulliRowSampleCollector + func (s *BernoulliRowSampleCollector) Base() *baseCollector + func (s *BernoulliRowSampleCollector) MergeCollector(subCollector RowSampleCollector) + func (s BernoulliRowSampleCollector) FromProto(pbCollector *tipb.RowSampleCollector, memTracker *memory.Tracker) + func (s BernoulliRowSampleCollector) ToProto() *tipb.RowSampleCollector + type Bucket struct + Count int64 + NDV int64 + Repeat int64 + type BucketFeedback struct + type CMSketch struct + func NewCMSketch(d, w int32) *CMSketch + func (c *CMSketch) CalcDefaultValForAnalyze(NDV uint64) + func (c *CMSketch) Copy() *CMSketch + func (c *CMSketch) Equal(rc *CMSketch) bool + func (c *CMSketch) GetWidthAndDepth() (int32, int32) + func (c *CMSketch) InsertBytes(bytes []byte) + func (c *CMSketch) InsertBytesByCount(bytes []byte, count uint64) + func (c *CMSketch) MemoryUsage() (sum int64) + func (c *CMSketch) MergeCMSketch(rc *CMSketch) error + func (c *CMSketch) MergeCMSketch4IncrementalAnalyze(rc *CMSketch, numTopN uint32) error + func (c *CMSketch) QueryBytes(d []byte) uint64 + func (c *CMSketch) SubValue(h1, h2 uint64, count uint64) + func (c *CMSketch) TotalCount() uint64 + type CacheItemMemoryUsage interface + CMSMemUsage func() int64 + HistMemUsage func() int64 + ItemID func() int64 + TopnMemUsage func() int64 + TotalMemoryUsage func() int64 + TrackingMemUsage func() int64 + type Column struct + CMSketch *CMSketch + Count int64 + FMSketch *FMSketch + Flag int64 + Info *model.ColumnInfo + IsHandle bool + LastAnalyzePos types.Datum + PhysicalID int64 + StatsVer int64 + TopN *TopN + func (c *Column) AvgColSize(count int64, isKey bool) float64 + func (c *Column) AvgColSizeChunkFormat(count int64) float64 + func (c *Column) AvgColSizeListInDisk(count int64) float64 + func (c *Column) BetweenRowCount(sctx sessionctx.Context, l, r types.Datum, lowEncoded, highEncoded []byte) float64 + func (c *Column) DropEvicted() + func (c *Column) GetColumnRowCount(sctx sessionctx.Context, ranges []*ranger.Range, ...) (float64, error) + func (c *Column) GetIncreaseFactor(realtimeRowCount int64) float64 + func (c *Column) IsAllEvicted() bool + func (c *Column) IsInvalid(sctx sessionctx.Context, collPseudo bool) bool + func (c *Column) ItemID() int64 + func (c *Column) MemoryUsage() CacheItemMemoryUsage + func (c *Column) String() string + func (c *Column) TotalRowCount() float64 + type ColumnMemUsage struct + CMSketchMemUsage int64 + ColumnID int64 + FMSketchMemUsage int64 + HistogramMemUsage int64 + TopNMemUsage int64 + TotalMemUsage int64 + func (c *ColumnMemUsage) CMSMemUsage() int64 + func (c *ColumnMemUsage) HistMemUsage() int64 + func (c *ColumnMemUsage) ItemID() int64 + func (c *ColumnMemUsage) TopnMemUsage() int64 + func (c *ColumnMemUsage) TotalMemoryUsage() int64 + func (c *ColumnMemUsage) TrackingMemUsage() int64 + type ErrorRate struct + ErrorTotal float64 + QueryTotal int64 + func (e *ErrorRate) Merge(rate *ErrorRate) + func (e *ErrorRate) NotAccurate() bool + func (e *ErrorRate) Update(rate float64) + type ExtendedStatsColl struct + LastUpdateVersion uint64 + Stats map[string]*ExtendedStatsItem + func NewExtendedStatsColl() *ExtendedStatsColl + type ExtendedStatsItem struct + ColIDs []int64 + ScalarVals float64 + StringVals string + Tp uint8 + type FMSketch struct + func DecodeFMSketch(data []byte) (*FMSketch, error) + func FMSketchFromProto(protoSketch *tipb.FMSketch) *FMSketch + func NewFMSketch(maxSize int) *FMSketch + func (s *FMSketch) Copy() *FMSketch + func (s *FMSketch) InsertRowValue(sc *stmtctx.StatementContext, values []types.Datum) error + func (s *FMSketch) InsertValue(sc *stmtctx.StatementContext, value types.Datum) error + func (s *FMSketch) MemoryUsage() (sum int64) + func (s *FMSketch) MergeFMSketch(rs *FMSketch) + func (s *FMSketch) NDV() int64 + type Feedback struct + Count int64 + Lower *types.Datum + Ndv int64 + Repeat int64 + Upper *types.Datum + func CleanRangeFeedbackByTopN(feedbacks []Feedback, topN *TopN) []Feedback + func NonOverlappedFeedbacks(sc *stmtctx.StatementContext, fbs []Feedback) ([]Feedback, bool) + type HistColl struct + ColID2IdxIDs map[int64][]int64 + Columns map[int64]*Column + Count int64 + HavePhysicalID bool + Idx2ColumnIDs map[int64][]int64 + Indices map[int64]*Index + ModifyCount int64 + PhysicalID int64 + Pseudo bool + func (coll *HistColl) GenerateHistCollFromColumnInfo(infos []*model.ColumnInfo, columns []*expression.Column) *HistColl + func (coll *HistColl) GetAvgRowSize(ctx sessionctx.Context, cols []*expression.Column, isEncodedKey bool, ...) (size float64) + func (coll *HistColl) GetAvgRowSizeListInDisk(cols []*expression.Column) (size float64) + func (coll *HistColl) GetIndexAvgRowSize(ctx sessionctx.Context, cols []*expression.Column, isUnique bool) (size float64) + func (coll *HistColl) GetRowCountByColumnRanges(sctx sessionctx.Context, colID int64, colRanges []*ranger.Range) (float64, error) + func (coll *HistColl) GetRowCountByIndexRanges(sctx sessionctx.Context, idxID int64, indexRanges []*ranger.Range) (float64, error) + func (coll *HistColl) GetRowCountByIntColumnRanges(sctx sessionctx.Context, colID int64, intRanges []*ranger.Range) (result float64, err error) + func (coll *HistColl) GetSelectivityByFilter(sctx sessionctx.Context, defaultSelectivity float64, ...) (ok bool, selectivity float64, err error) + func (coll *HistColl) GetTableAvgRowSize(ctx sessionctx.Context, cols []*expression.Column, storeType kv.StoreType, ...) (size float64) + func (coll *HistColl) ID2UniqueID(columns []*expression.Column) *HistColl + func (coll *HistColl) NewHistCollBySelectivity(sctx sessionctx.Context, statsNodes []*StatsNode) *HistColl + func (coll *HistColl) Selectivity(ctx sessionctx.Context, exprs []expression.Expression, ...) (float64, []*StatsNode, error) + type Histogram struct + Bounds *chunk.Chunk + Buckets []Bucket + Correlation float64 + ID int64 + LastUpdateVersion uint64 + NDV int64 + NullCount int64 + TotColSize int64 + Tp *types.FieldType + func BuildColumn(ctx sessionctx.Context, numBuckets, id int64, collector *SampleCollector, ...) (*Histogram, error) + func BuildColumnHist(ctx sessionctx.Context, numBuckets, id int64, collector *SampleCollector, ...) (*Histogram, error) + func HistogramFromProto(protoHg *tipb.Histogram) *Histogram + func MergeHistograms(sc *stmtctx.StatementContext, lh *Histogram, rh *Histogram, bucketSize int, ...) (*Histogram, error) + func MergePartitionHist2GlobalHist(sc *stmtctx.StatementContext, hists []*Histogram, popedTopN []TopNMeta, ...) (*Histogram, error) + func NewHistogram(id, ndv, nullCount int64, version uint64, tp *types.FieldType, bucketSize int, ...) *Histogram + func UpdateHistogram(h *Histogram, feedback *QueryFeedback, statsVer int) *Histogram + func UpdateHistogramWithBucketCount(h *Histogram, feedback *QueryFeedback, statsVer int, bucketCount int) *Histogram + func (hg *Histogram) AddIdxVals(idxValCntPairs []TopNMeta) + func (hg *Histogram) AppendBucket(lower *types.Datum, upper *types.Datum, count, repeat int64) + func (hg *Histogram) AppendBucketWithNDV(lower *types.Datum, upper *types.Datum, count, repeat, ndv int64) + func (hg *Histogram) AvgCountPerNotNullValue(totalCount int64) float64 + func (hg *Histogram) BetweenRowCount(a, b types.Datum) float64 + func (hg *Histogram) BucketToString(bktID, idxCols int) string + func (hg *Histogram) ConvertTo(sc *stmtctx.StatementContext, tp *types.FieldType) (*Histogram, error) + func (hg *Histogram) Copy() *Histogram + func (hg *Histogram) DecodeTo(tp *types.FieldType, timeZone *time.Location) error + func (hg *Histogram) ExtractTopN(cms *CMSketch, topN *TopN, numCols int, numTopN uint32) error + func (hg *Histogram) GetIncreaseFactor(totalCount int64) float64 + func (hg *Histogram) GetLower(idx int) *types.Datum + func (hg *Histogram) GetUpper(idx int) *types.Datum + func (hg *Histogram) IsIndexHist() bool + func (hg *Histogram) Len() int + func (hg *Histogram) LessRowCountWithBktIdx(value types.Datum) (float64, int) + func (hg *Histogram) MemoryUsage() (sum int64) + func (hg *Histogram) PreCalculateScalar() + func (hg *Histogram) RemoveUpperBound() *Histogram + func (hg *Histogram) RemoveVals(valCntPairs []TopNMeta) + func (hg *Histogram) SplitRange(sc *stmtctx.StatementContext, oldRanges []*ranger.Range, encoded bool) ([]*ranger.Range, bool) + func (hg *Histogram) ToString(idxCols int) string + func (hg *Histogram) TotalRowCount() float64 + func (hg *Histogram) TruncateHistogram(numBkt int) *Histogram + type Index struct + CMSketch *CMSketch + FMSketch *FMSketch + Flag int64 + Info *model.IndexInfo + LastAnalyzePos types.Datum + PhysicalID int64 + StatsVer int64 + TopN *TopN + func (idx *Index) BetweenRowCount(l, r types.Datum) float64 + func (idx *Index) EvictAllStats() + func (idx *Index) GetIncreaseFactor(realtimeRowCount int64) float64 + func (idx *Index) GetRowCount(sctx sessionctx.Context, coll *HistColl, indexRanges []*ranger.Range, ...) (float64, error) + func (idx *Index) IsAllEvicted() bool + func (idx *Index) IsEvicted() bool + func (idx *Index) IsInvalid(collPseudo bool) bool + func (idx *Index) ItemID() int64 + func (idx *Index) MemoryUsage() CacheItemMemoryUsage + func (idx *Index) QueryBytes(d []byte) uint64 + func (idx *Index) String() string + func (idx *Index) TotalRowCount() float64 + type IndexMemUsage struct + CMSketchMemUsage int64 + HistogramMemUsage int64 + IndexID int64 + TopNMemUsage int64 + TotalMemUsage int64 + func (c *IndexMemUsage) CMSMemUsage() int64 + func (c *IndexMemUsage) HistMemUsage() int64 + func (c *IndexMemUsage) ItemID() int64 + func (c *IndexMemUsage) TopnMemUsage() int64 + func (c *IndexMemUsage) TotalMemoryUsage() int64 + func (c *IndexMemUsage) TrackingMemUsage() int64 + type QueryFeedback struct + Expected int64 + Feedback []Feedback + Hist *Histogram + PhysicalID int64 + Tp int + Valid goatomic.Bool + func NewQueryFeedback(physicalID int64, hist *Histogram, expected int64, desc bool) *QueryFeedback + func (q *QueryFeedback) Actual() int64 + func (q *QueryFeedback) CalcErrorRate() float64 + func (q *QueryFeedback) DecodeIntValues() *QueryFeedback + func (q *QueryFeedback) DecodeToRanges(isIndex bool) ([]*ranger.Range, error) + func (q *QueryFeedback) Invalidate() + func (q *QueryFeedback) StoreRanges(ranges []*ranger.Range) + func (q *QueryFeedback) Update(startKey kv.Key, counts, ndvs []int64) + type QueryFeedbackKey struct + HistID int64 + PhysicalID int64 + Tp int + type QueryFeedbackMap struct + Feedbacks map[QueryFeedbackKey][]*QueryFeedback + Size int + func NewQueryFeedbackMap() *QueryFeedbackMap + func (m *QueryFeedbackMap) Append(q *QueryFeedback) + func (m *QueryFeedbackMap) Merge(r *QueryFeedbackMap) + func (m *QueryFeedbackMap) SiftFeedbacks() + type ReservoirRowSampleCollector struct + MaxSampleSize int + func NewReservoirRowSampleCollector(maxSampleSize int, totalLen int) *ReservoirRowSampleCollector + func (s *ReservoirRowSampleCollector) Base() *baseCollector + func (s *ReservoirRowSampleCollector) MergeCollector(subCollector RowSampleCollector) + func (s ReservoirRowSampleCollector) FromProto(pbCollector *tipb.RowSampleCollector, memTracker *memory.Tracker) + func (s ReservoirRowSampleCollector) ToProto() *tipb.RowSampleCollector + type ReservoirRowSampleItem struct + Columns []types.Datum + Handle kv.Handle + Weight int64 + func (i ReservoirRowSampleItem) MemUsage() (sum int64) + type RowSampleBuilder struct + ColGroups [][]int64 + Collators []collate.Collator + ColsFieldType []*types.FieldType + MaxFMSketchSize int + MaxSampleSize int + RecordSet sqlexec.RecordSet + Rng *rand.Rand + SampleRate float64 + Sc *stmtctx.StatementContext + func (s *RowSampleBuilder) Collect() (RowSampleCollector, error) + type RowSampleCollector interface + Base func() *baseCollector + MergeCollector func(collector RowSampleCollector) + func NewRowSampleCollector(maxSampleSize int, sampleRate float64, totalLen int) RowSampleCollector + type SampleBuilder struct + CMSketchDepth int32 + CMSketchWidth int32 + ColLen int + Collators []collate.Collator + ColsFieldType []*types.FieldType + MaxBucketSize int64 + MaxFMSketchSize int64 + MaxSampleSize int64 + PkBuilder *SortedBuilder + RecordSet sqlexec.RecordSet + Sc *stmtctx.StatementContext + func (s SampleBuilder) CollectColumnStats() ([]*SampleCollector, *SortedBuilder, error) + type SampleCollector struct + CMSketch *CMSketch + Count int64 + FMSketch *FMSketch + IsMerger bool + MaxSampleSize int64 + MemSize int64 + NullCount int64 + Samples []*SampleItem + TopN *TopN + TotalSize int64 + func SampleCollectorFromProto(collector *tipb.SampleCollector) *SampleCollector + func (c *SampleCollector) CalcTotalSize() + func (c *SampleCollector) ExtractTopN(numTop uint32, sc *stmtctx.StatementContext, tp *types.FieldType, ...) error + func (c *SampleCollector) MergeSampleCollector(sc *stmtctx.StatementContext, rc *SampleCollector) + type SampleItem struct + Handle kv.Handle + Ordinal int + Value types.Datum + func CopySampleItems(items []*SampleItem) []*SampleItem + func SortSampleItems(sc *stmtctx.StatementContext, items []*SampleItem) ([]*SampleItem, error) + type SortedBuilder struct + Count int64 + func NewSortedBuilder(sc *stmtctx.StatementContext, numBuckets, id int64, tp *types.FieldType, ...) *SortedBuilder + func (b *SortedBuilder) Hist() *Histogram + func (b *SortedBuilder) Iterate(data types.Datum) error + type StatsLoadedStatus struct + func NewStatsAllEvictedStatus() StatsLoadedStatus + func NewStatsFullLoadStatus() StatsLoadedStatus + func (s StatsLoadedStatus) IsAllEvicted() bool + func (s StatsLoadedStatus) IsCMSEvicted() bool + func (s StatsLoadedStatus) IsEssentialStatsLoaded() bool + func (s StatsLoadedStatus) IsFullLoad() bool + func (s StatsLoadedStatus) IsLoadNeeded() bool + func (s StatsLoadedStatus) IsStatsInitialized() bool + func (s StatsLoadedStatus) IsTopNEvicted() bool + func (s StatsLoadedStatus) StatusToString() string + type StatsNode struct + ID int64 + Ranges []*ranger.Range + Selectivity float64 + Tp int + func GetUsableSetsByGreedy(nodes []*StatsNode) (newBlocks []*StatsNode) + func MockStatsNode(id int64, m int64, num int) *StatsNode + type StatsReader struct + func GetStatsReader(snapshot uint64, exec sqlexec.RestrictedSQLExecutor) (reader *StatsReader, err error) + func (sr *StatsReader) Close() error + func (sr *StatsReader) IsHistory() bool + func (sr *StatsReader) Read(sql string, args ...interface{}) (rows []chunk.Row, fields []*ast.ResultField, err error) + type StatsWrapper struct + AllHg []*Histogram + AllTopN []*TopN + func NewStatsWrapper(hg []*Histogram, topN []*TopN) *StatsWrapper + type Table struct + ExtendedStats *ExtendedStatsColl + Name string + TblInfoUpdateTS uint64 + Version uint64 + func PseudoTable(tblInfo *model.TableInfo) *Table + func (t *Table) ColumnBetweenRowCount(sctx sessionctx.Context, a, b types.Datum, colID int64) (float64, error) + func (t *Table) ColumnByName(colName string) *Column + func (t *Table) ColumnEqualRowCount(sctx sessionctx.Context, value types.Datum, colID int64) (float64, error) + func (t *Table) ColumnGreaterRowCount(sctx sessionctx.Context, value types.Datum, colID int64) float64 + func (t *Table) ColumnLessRowCount(sctx sessionctx.Context, value types.Datum, colID int64) float64 + func (t *Table) Copy() *Table + func (t *Table) GetColRowCount() float64 + func (t *Table) GetStatsHealthy() (int64, bool) + func (t *Table) GetStatsInfo(ID int64, isIndex bool) (int64, *Histogram, *CMSketch, *TopN, *FMSketch, bool) + func (t *Table) IndexStartWithColumn(colName string) *Index + func (t *Table) IsInitialized() bool + func (t *Table) IsOutdated() bool + func (t *Table) MemoryUsage() *TableMemoryUsage + func (t *Table) PseudoAvgCountPerValue() float64 + func (t *Table) String() string + type TableCacheItem interface + IsAllEvicted func() bool + ItemID func() int64 + MemoryUsage func() CacheItemMemoryUsage + type TableMemoryUsage struct + ColumnsMemUsage map[int64]CacheItemMemoryUsage + IndicesMemUsage map[int64]CacheItemMemoryUsage + TableID int64 + TotalMemUsage int64 + func (t *TableMemoryUsage) TotalColTrackingMemUsage() (sum int64) + func (t *TableMemoryUsage) TotalIdxTrackingMemUsage() (sum int64) + func (t *TableMemoryUsage) TotalTrackingMemUsage() int64 + type TopN struct + TopN []TopNMeta + func NewTopN(n int) *TopN + func TopNFromProto(protoTopN []*tipb.CMSketchTopN) *TopN + func (c *TopN) AppendTopN(data []byte, count uint64) + func (c *TopN) BetweenCount(l, r []byte) uint64 + func (c *TopN) Copy() *TopN + func (c *TopN) DecodedString(ctx sessionctx.Context, colTypes []byte) (string, error) + func (c *TopN) Equal(cc *TopN) bool + func (c *TopN) LowerBound(d []byte) (idx int, match bool) + func (c *TopN) MemoryUsage() (sum int64) + func (c *TopN) Num() int + func (c *TopN) QueryTopN(d []byte) (uint64, bool) + func (c *TopN) RemoveVal(val []byte) + func (c *TopN) Sort() + func (c *TopN) String() string + func (c *TopN) TotalCount() uint64 + type TopNMeta struct + Count uint64 + Encoded []byte + func MergeTopNAndUpdateCMSketch(dst, src *TopN, c *CMSketch, numTop uint32) []TopNMeta + func SortTopnMeta(topnMetas []TopNMeta) []TopNMeta + type TopnStatsMergeResponse struct + Err error + PopedTopn []TopNMeta + RemoveVals [][]TopNMeta + TopN *TopN + type TopnStatsMergeTask struct + func NewTopnStatsMergeTask(start, end int) *TopnStatsMergeTask + type WeightedRowSampleHeap []*ReservoirRowSampleItem + func (h *WeightedRowSampleHeap) Pop() interface{} + func (h *WeightedRowSampleHeap) Push(i interface{}) + func (h WeightedRowSampleHeap) Len() int + func (h WeightedRowSampleHeap) Less(i, j int) bool + func (h WeightedRowSampleHeap) Swap(i, j int) Other modules containing this package github.com/lemon-mint/tidb