ClickHouse/docs/en/sql-reference/statements/alter/setting.md
lehasm 5f977baae3
Update docs/en/sql-reference/statements/alter/setting.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-07-26 08:03:16 +03:00

1.4 KiB

toc_priority toc_title
38 SETTING

Table Settings Manipulations

A set of queries to change table settings. You can modify settings or reset them to default values. A single query can change several settings at once. If a setting with the specified name does not exist, then the query raises an exception.

Syntax

ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY|RESET SETTING ...

!!! note "Note" These queries can be applied to MergeTree tables only.

MODIFY SETTING

Changes table settings.

Syntax

MODIFY SETTING setting_name=value [, ...]

Example

CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id;

ALTER TABLE example_table MODIFY SETTING max_part_loading_threads=8, max_parts_in_total=50000;

RESET SETTING

Resets table settings to their default values. If a setting is in a default state, then no action is taken.

Syntax

RESET SETTING setting_name [, ...]

Example

CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id
    SETTINGS max_part_loading_threads=8;
    
ALTER TABLE example_table RESET SETTING max_part_loading_threads;

See Also