package
23.2.20+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
ConstructExtremesHistogram returns a histogram that are two equi-depth histograms stitched together that are each generated by equiDepthHistogramWithoutAdjustment.
DecodeHistogramBuckets decodes encoded HistogramData in tabStat and writes the resulting buckets into tabStat.Histogram.
DeleteOldStatsForColumns deletes old statistics from the system.table_statistics table.
DeleteOldStatsForOtherColumns deletes statistics from the system.table_statistics table for columns *not* in the given set of column IDs that are older than keepTime.
EncodeUpperBound encodes the upper-bound datum of a histogram bucket.
EquiDepthHistogram creates a histogram where each bucket contains roughly the same number of samples (though it can vary when a boundary value has high frequency).
ForecastTableStatistics produces zero or more statistics forecasts based on the given observed statistics.
GetDefaultHistogramBuckets gets the default number of histogram buckets to create for the given table.
InsertNewStat inserts a new statistic in the system table.
InsertNewStats inserts a slice of statistics at the current time into the system table.
MakeRefresher creates a new Refresher.
MakeSortedColStatKey constructs a unique key representing cols that can be used as the key in a map, and also sorts cols as a side-effect.
MergedStatistics returns an array of table statistics that are the merged combinations of the latest full statistic and the latest partial statistic for a specific column set.
NewTableStatisticProto converts a row of datums from system.table_statistics into a TableStatisticsProto.
NewTableStatisticsCache creates a new TableStatisticsCache that can hold statistics for <cacheSize> tables.
# Variables
AutomaticStatisticsClusterMode controls the cluster setting for enabling automatic table statistics collection.
AutomaticStatisticsFractionStaleRows controls the cluster setting for the target fraction of rows in a table that should be stale before statistics on that table are refreshed, in addition to the constant value AutomaticStatisticsMinStaleRows.
AutomaticStatisticsMaxIdleTime controls the maximum fraction of time that the sampler processors will be idle when scanning large tables for automatic statistics (in high load scenarios).
AutomaticStatisticsMinStaleRows controls the cluster setting for the target number of rows that should be updated before a table is refreshed, in addition to the fraction AutomaticStatisticsFractionStaleRows.
AutomaticStatisticsOnSystemTables controls the cluster setting for enabling automatic statistics collection on system tables.
ConcurrentCreateStatsError is reported when two CREATE STATISTICS jobs are issued concurrently.
DefaultAsOfTime is a duration which is used to define the AS OF time for automatic runs of CREATE STATISTICS.
DefaultHistogramBuckets is the maximum number of histogram buckets to build when creating statistics.
DefaultRefreshInterval is the frequency at which the Refresher will check if the stats for each table should be refreshed.
HistogramClusterMode controls the cluster setting for enabling histogram collection.
MultiColumnStatisticsClusterMode controls the cluster setting for enabling automatic collection of multi-column statistics.
RandDatum is randgen.RandDatum.
RandType is randgen.RandType.
TableStatisticsRetentionPeriod controls the cluster setting for the retention period of statistics that are not collected by default.
UseStatisticsForecasts controls whether statistics forecasts are generated in the stats cache.
UseStatisticsOnSystemTables controls the cluster setting for enabling statistics usage by the optimizer for planning queries involving system tables.
# Structs
JSONHistoBucket is a struct used for JSON marshaling and unmarshaling of histogram data.
JSONStatistic is a struct used for JSON marshaling and unmarshaling statistics.
Refresher is responsible for automatically refreshing the table statistics that are used by the cost-based optimizer.
SampledRow is a row that was sampled.
SampleReservoir implements reservoir sampling using random sort.
A TableStatistic object holds a statistic for a particular column or group of columns.
A TableStatisticsCache contains two underlying LRU caches: (1) A cache of []*TableStatistic objects, keyed by table ID.
TableStatsTestingKnobs contains testing knobs for table statistics.
# Type aliases
HistogramVersion identifies histogram versions.