SHOW SETTINGS
TiDB Cloud Lake 提供了多种系统设置,使你能够控制 TiDB Cloud Lake 的工作方式。此命令会显示可用系统设置的当前值、默认值以及设置级别。要修改某个设置,请使用 SET 或 UNSET 命令。
- TiDB Cloud Lake 的某些行为无法通过系统设置进行更改;你在使用 TiDB Cloud Lake 时必须将这些行为考虑在内。例如:
- TiDB Cloud Lake 会将字符串编码为 UTF-8 字符集。
- TiDB Cloud Lake 对数组使用从 1 开始的编号约定。
- TiDB Cloud Lake 将系统设置存储在系统表 system.settings 中。
语法
SHOW SETTINGS [LIKE '<pattern>' | WHERE <expr>] | [LIMIT <limit>]
设置级别
每个 TiDB Cloud Lake 设置都具有一个级别,可以是 Global、Default 或 Session。下表说明了各个级别之间的区别:
示例
SHOW SETTINGS LIMIT 5;
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ name │ value │ default │ range │ level │ description │ type │
├─────────────────────────────────────────────┼────────┼─────────┼──────────┼─────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────┤
│ acquire_lock_timeout │ 15 │ 15 │ None │ DEFAULT │ Sets the maximum timeout in seconds for acquire a lock. │ UInt64 │
│ aggregate_spilling_bytes_threshold_per_proc │ 0 │ 0 │ None │ DEFAULT │ Sets the maximum amount of memory in bytes that an aggregator can use before spilling data to storage during query execution. │ UInt64 │
│ aggregate_spilling_memory_ratio │ 0 │ 0 │ [0, 100] │ DEFAULT │ Sets the maximum memory ratio in bytes that an aggregator can use before spilling data to storage during query execution. │ UInt64 │
│ auto_compaction_imperfect_blocks_threshold │ 50 │ 50 │ None │ DEFAULT │ Threshold for triggering auto compaction. This occurs when the number of imperfect blocks in a snapshot exceeds this value after write operations. │ UInt64 │
│ collation │ utf8 │ utf8 │ ["utf8"] │ DEFAULT │ Sets the character collation. Available values include "utf8". │ String │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘