Skip to content

Commit

Permalink
doc: make sql.index_recommendation.drop_unused_duration public
Browse files Browse the repository at this point in the history
Make the cluster setting `sql.index_recommendation.drop_unused_duration`
public.

Fixes #104734

Release note (sql change): Make the cluster setting
`sql.index_recommendation.drop_unused_duration` public for docs.
  • Loading branch information
maryliag committed Feb 2, 2024
1 parent 01c3aa0 commit 80bcfb1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/generated/settings/settings-for-tenants.txt
Expand Up @@ -246,6 +246,7 @@ sql.distsql.temp_storage.workmem byte size 64 MiB maximum amount of memory in by
sql.guardrails.max_row_size_err byte size 512 MiB maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an error is returned; use 0 to disable application
sql.guardrails.max_row_size_log byte size 64 MiB maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an event is logged to SQL_PERF (or SQL_INTERNAL_PERF if the mutating statement was internal); use 0 to disable application
sql.hash_sharded_range_pre_split.max integer 16 max pre-split ranges to have when adding hash sharded index to an existing table application
sql.index_recommendation.drop_unused_duration duration 168h0m0s the index unused duration at which we begin to recommend dropping the index application
sql.insights.anomaly_detection.enabled boolean true enable per-fingerprint latency recording and anomaly detection application
sql.insights.anomaly_detection.latency_threshold duration 50ms statements must surpass this threshold to trigger anomaly detection and identification application
sql.insights.anomaly_detection.memory_limit byte size 1.0 MiB the maximum amount of memory allowed for tracking statement latencies application
Expand Down
1 change: 1 addition & 0 deletions docs/generated/settings/settings.html
Expand Up @@ -195,6 +195,7 @@
<tr><td><div id="setting-sql-guardrails-max-row-size-err" class="anchored"><code>sql.guardrails.max_row_size_err</code></div></td><td>byte size</td><td><code>512 MiB</code></td><td>maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an error is returned; use 0 to disable</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-guardrails-max-row-size-log" class="anchored"><code>sql.guardrails.max_row_size_log</code></div></td><td>byte size</td><td><code>64 MiB</code></td><td>maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an event is logged to SQL_PERF (or SQL_INTERNAL_PERF if the mutating statement was internal); use 0 to disable</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-hash-sharded-range-pre-split-max" class="anchored"><code>sql.hash_sharded_range_pre_split.max</code></div></td><td>integer</td><td><code>16</code></td><td>max pre-split ranges to have when adding hash sharded index to an existing table</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-index-recommendation-drop-unused-duration" class="anchored"><code>sql.index_recommendation.drop_unused_duration</code></div></td><td>duration</td><td><code>168h0m0s</code></td><td>the index unused duration at which we begin to recommend dropping the index</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-insights-anomaly-detection-enabled" class="anchored"><code>sql.insights.anomaly_detection.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>enable per-fingerprint latency recording and anomaly detection</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-insights-anomaly-detection-latency-threshold" class="anchored"><code>sql.insights.anomaly_detection.latency_threshold</code></div></td><td>duration</td><td><code>50ms</code></td><td>statements must surpass this threshold to trigger anomaly detection and identification</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-insights-anomaly-detection-memory-limit" class="anchored"><code>sql.insights.anomaly_detection.memory_limit</code></div></td><td>byte size</td><td><code>1.0 MiB</code></td><td>the maximum amount of memory allowed for tracking statement latencies</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion pkg/sql/idxusage/index_usage_stats_rec.go
Expand Up @@ -45,9 +45,10 @@ const defaultUnusedIndexDuration = 7 * 24 * time.Hour
var DropUnusedIndexDuration = settings.RegisterDurationSetting(
settings.ApplicationLevel,
"sql.index_recommendation.drop_unused_duration",
"the index unuse duration at which we begin to recommend dropping the index",
"the index unused duration at which we begin to recommend dropping the index",
defaultUnusedIndexDuration,
settings.NonNegativeDuration,
settings.WithPublic,
)

const indexExceedUsageDurationReasonPlaceholder = "This index has not been used in over %sand can be removed for better write performance."
Expand Down

0 comments on commit 80bcfb1

Please sign in to comment.