Help wanted!
The following content of this documentation page has been machine-translated. But unlike other websites, it is not done on the fly. This translated text lives on GitHub repository alongside main ClickHouse codebase and waits for fellow native speakers to make it more human-readable. You can also use the original English version as a reference.
Help ClickHouse documentation by editing this page
系统。设置
包含有关当前用户的会话设置的信息。
列:
name
(字符串) — Setting name.value
(字符串) — Setting value.changed
(UInt8) — Shows whether a setting is changed from its default value.description
(字符串) — Short setting description.min
(可为空(字符串)) — Minimum value of the setting, if any is set via 制约因素. 如果设置没有最小值,则包含 NULL.max
(可为空(字符串)) — Maximum value of the setting, if any is set via 制约因素. 如果设置没有最大值,则包含 NULL.readonly
(UInt8) — Shows whether the current user can change the setting:0
— Current user can change the setting.1
— Current user can’t change the setting.
示例
下面的示例演示如何获取有关名称包含的设置的信息 min_i
.
SELECT *
FROM system.settings
WHERE name LIKE '%min_i%'
┌─name────────────────────────────────────────┬─value─────┬─changed─┬─description───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─min──┬─max──┬─readonly─┐
│ min_insert_block_size_rows │ 1048576 │ 0 │ Squash blocks passed to INSERT query to specified size in rows, if blocks are not big enough. │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 0 │
│ min_insert_block_size_bytes │ 268435456 │ 0 │ Squash blocks passed to INSERT query to specified size in bytes, if blocks are not big enough. │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 0 │
│ read_backoff_min_interval_between_events_ms │ 1000 │ 0 │ Settings to reduce the number of threads in case of slow reads. Do not pay attention to the event, if the previous one has passed less than a certain amount of time. │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 0 │
└─────────────────────────────────────────────┴───────────┴─────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────┴──────┴──────────┘
使用 WHERE changed
可以是有用的,例如,当你想检查:
- 配置文件中的设置是否正确加载并正在使用。
- 在当前会话中更改的设置。
SELECT * FROM system.settings WHERE changed AND name='load_balancing'
另请参阅
当前内容版权归 ClickHouse 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ClickHouse .