> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 包含当前用户的会话设置信息的系统表。

# system.settings

<div id="description">
  ## 描述
</div>

包含当前用户的会话设置信息。

<div id="columns">
  ## 列
</div>

* `name` ([String](/zh/reference/data-types)) — 设置名称。
* `value` ([String](/zh/reference/data-types)) — 设置值。
* `changed` ([UInt8](/zh/reference/data-types)) — 显示该设置是否已在配置中显式定义或被显式修改。
* `description` ([String](/zh/reference/data-types)) — 设置的简要说明。
* `min` ([Nullable(String)](/zh/reference/data-types)) — 该设置的最小值 (如果已通过约束设置) 。如果该设置没有最小值，则为 NULL。
* `max` ([Nullable(String)](/zh/reference/data-types)) — 该设置的最大值 (如果已通过约束设置) 。如果该设置没有最大值，则为 NULL。
* `disallowed_values` ([Array(String)](/zh/reference/data-types)) — 不允许的值列表
* `readonly` ([UInt8](/zh/reference/data-types)) — 显示当前用户是否可以更改该设置：0 — 当前用户可以更改该设置，1 — 当前用户不能更改该设置。
* `type` ([String](/zh/reference/data-types)) — 可赋给此设置的值类型。
* `default` ([String](/zh/reference/data-types)) — 设置的默认值。
* `alias_for` ([String](/zh/reference/data-types)) — 如果该设置是另一个设置的别名，则为原始设置的名称。
* `is_obsolete` ([UInt8](/zh/reference/data-types)) — 显示该设置是否已废弃。
* `tier` ([Enum8('Production' = 0, 'Obsolete' = 4, 'Experimental' = 8, 'Beta' = 12)](/zh/reference/data-types)) —
  此特性的支持级别。ClickHouse 特性按层级组织，具体取决于其当前
  开发状态以及使用时可预期的行为：

- PRODUCTION：该特性属于稳定版本，可安全使用，且与其他 PRODUCTION 特性交互时不会出现问题。
- BETA：该特性稳定且安全。与其他特性一同使用时的结果未知，且不保证正确性。欢迎测试并提交反馈。
- EXPERIMENTAL：该特性仍在开发中。仅适用于开发者和 ClickHouse 爱好者。该特性可能可用，也可能不可用，并且可能随时被移除。
- OBSOLETE：不再受支持。它要么已被移除，要么将在未来版本中被移除。

<div id="example">
  ## 示例
</div>

以下示例展示了如何获取名称中包含 `min_i` 的设置信息。

```sql theme={null}
SELECT *
FROM system.settings
WHERE name LIKE '%min_insert_block_size_%'
FORMAT Vertical
```

```text theme={null}
Row 1:
──────
name:        min_insert_block_size_rows
value:       1048449
changed:     0
description: Sets the minimum number of rows in the block that can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones.

Possible values:

- Positive integer.
- 0 — Squashing disabled.
min:         ᴺᵁᴸᴸ
max:         ᴺᵁᴸᴸ
readonly:    0
type:        UInt64
default:     1048449
alias_for:   
is_obsolete: 0
tier:        Production

Row 2:
──────
name:        min_insert_block_size_bytes
value:       268402944
changed:     0
description: Sets the minimum number of bytes in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones.

Possible values:

- Positive integer.
- 0 — Squashing disabled.
min:         ᴺᵁᴸᴸ
max:         ᴺᵁᴸᴸ
readonly:    0
type:        UInt64
default:     268402944
alias_for:   
is_obsolete: 0
tier:        Production

Row 3:
──────
name:        min_insert_block_size_rows_for_materialized_views
value:       0
changed:     0
description: Sets the minimum number of rows in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](/reference/statements/create/view). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage.

Possible values:

- Any positive integer.
- 0 — Squashing disabled.

## See Also            

- [min_insert_block_size_rows](/reference/settings/session-settings#min_insert_block_size_rows)
min:         ᴺᵁᴸᴸ
max:         ᴺᵁᴸᴸ
readonly:    0
type:        UInt64
default:     0
alias_for:   
is_obsolete: 0
tier:        Production

Row 4:
──────
name:        min_insert_block_size_bytes_for_materialized_views
value:       0
changed:     0
description: Sets the minimum number of bytes in the block which can be inserted into a table by an `INSERT` query. Smaller-sized blocks are squashed into bigger ones. This setting is applied only for blocks inserted into [materialized view](/reference/statements/create/view). By adjusting this setting, you control blocks squashing while pushing to materialized view and avoid excessive memory usage.

Possible values:

- Any positive integer.
- 0 — Squashing disabled.

## See Also            

- [min_insert_block_size_bytes](/reference/settings/session-settings#min_insert_block_size_bytes)
min:         ᴺᵁᴸᴸ
max:         ᴺᵁᴸᴸ
readonly:    0
type:        UInt64
default:     0
alias_for:   
is_obsolete: 0
tier:        Production
```

使用 `WHERE changed` 很有用，例如，当你想检查以下内容时：

* 配置文件中的设置是否已正确加载并生效。
* 当前会话中发生变更的设置。

```sql theme={null}
SELECT * FROM system.settings WHERE changed AND name='load_balancing'
```

<div id="see-also">
  ## 另请参阅
</div>

* [设置](/zh/reference/system-tables/overview#system-tables-introduction)
* [查询权限](/zh/concepts/features/configuration/settings/permissions-for-queries)
* [设置约束](/zh/concepts/features/configuration/settings/constraints-on-settings)
* [SHOW SETTINGS](/zh/reference/statements/show#show-settings) 语句
