package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
CheckScheduleAnomaly checks a given schedule to see if it is either paused or has unusually long run interval.
CreateCompactionJob creates a system.jobs record.
CreateSQLStatsCompactionScheduleIfNotYetExist registers SQL Stats compaction job with the scheduled job subsystem so the compaction job can be run periodically.
New returns a new instance of the PersistedSQLStats.
NewCombinedStmtStatsIterator returns a new instance of CombinedStmtStatsIterator.
NewCombinedTxnStatsIterator returns a new instance of CombinedTxnStatsIterator.
NewController returns a new instance of sqlstats.Controller.
NewStatsCompactor returns a new instance of StatsCompactor.
# Variables
CompactionJobRowsToDeletePerTxn is the cluster setting that controls how many rows in the statement/transaction_statistics tables gets deleted per transaction in the Automatic SQL Stats Compaction Job.
DiscardInMemoryStatsWhenFlushDisabled is the cluster setting that allows the older in-memory SQL stats to be discarded when flushing to persisted tables is disabled.
ErrDuplicatedSchedules indicates that there is already a schedule for sql stats compaction job existing in the system.scheduled_jobs table.
ErrScheduleIntervalTooLong is returned when monitor detects that sql stats compaction's schedule for next run is too far into the future.
ErrSchedulePaused is returned when monitor detects that the schedule is paused.
ErrScheduleUndroppable is returned when user is attempting to drop sql stats compaction schedule.
MinimumInterval is the cluster setting that controls the minimum interval between each flush operation.
SQLStatsAggregationInterval is the cluster setting that controls the aggregation interval for stats when we flush to disk.
SQLStatsCleanupRecurrence is the cron-tab string specifying the recurrence for SQL Stats cleanup job.
SQLStatsFlushEnabled is the cluster setting that controls if the sqlstats subsystem persists the statistics into system table.
SQLStatsFlushInterval is the cluster setting that controls how often the SQL stats are flushed to system table.
SQLStatsFlushJitter specifies the jitter fraction on the interval between attempts to flush SQL Stats.
SQLStatsLimitTableCheckInterval is the cluster setting the controls what interval the check is done if the statement and transaction statistics tables have grown past the sql.stats.persisted_rows.max.
SQLStatsMaxPersistedRows specifies maximum number of rows that will be retained in system.statement_statistics and system.transaction_statistics.
# Structs
CombinedStmtStatsIterator is an iterator that iterates through both in-memory and persisted stmt stats provided by the in-memory iterator and the on-disk iterator.
CombinedTxnStatsIterator is an iterator that iterates through both in-memory and persisted txn stats provided by the in-memory iterator and the on-disk iterator.
Config is a configuration struct for the persisted SQL stats subsystem.
Controller implements the SQL Stats subsystem control plane.
PersistedSQLStats is a sqlstats.Provider that wraps a node-local in-memory sslocal.SQLStats.
StatsCompactor is responsible for compacting older SQL Stats.