From fd3f89d5549a9dc10965a4e83196241109c8e86b Mon Sep 17 00:00:00 2001 From: maryliag Date: Fri, 24 Feb 2023 18:31:36 +0000 Subject: [PATCH] sqlstats: increase default value for deleted rows During the sql stats compaction job, we limit the amount of rows being deleted per transaction. We used a default value of 1024, but we have been increasinly seeing customer needing to increase this value to allow the job to keep up with the large amount of data being flushed. We have been recommening a value for 20k, so being more conservative with the default (plus the changes on #97123 that won't let tables get in a state with so many rows), this commit changes the value to 10k. Fixes #97528 Release note (sql change): Increase the default value of `sql.stats.cleanup.rows_to_delete_per_txn` to 10k, to increase efficiency of the cleanup job for sql statistics. --- pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go b/pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go index 2e46917387cd..61c7db7794b7 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go +++ b/pkg/sql/sqlstats/persistedsqlstats/cluster_settings.go @@ -126,6 +126,6 @@ var CompactionJobRowsToDeletePerTxn = settings.RegisterIntSetting( settings.TenantWritable, "sql.stats.cleanup.rows_to_delete_per_txn", "number of rows the compaction job deletes from system table per iteration", - 1024, + 10000, settings.NonNegativeInt, )