ClickHouse/docs/en/sql-reference/statements/create/settings-profile.md
Nikolay Degterinsky bd23b0fa61
Fix docs
2022-12-08 14:17:55 +01:00

1.0 KiB

slug sidebar_position sidebar_label title
/en/sql-reference/statements/create/settings-profile 43 SETTINGS PROFILE CREATE SETTINGS PROFILE

Creates settings profiles that can be assigned to a user or a role.

Syntax:

CREATE SETTINGS PROFILE [IF NOT EXISTS | OR REPLACE] name1 [ON CLUSTER cluster_name1]
        [, name2 [ON CLUSTER cluster_name2] ...]
    [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [CONST|READONLY|WRITABLE|CHANGEABLE_IN_READONLY] | INHERIT 'profile_name'] [,...]

ON CLUSTER clause allows creating settings profiles on a cluster, see Distributed DDL.

Example

Create the max_memory_usage_profile settings profile with value and constraints for the max_memory_usage setting and assign it to user robin:

CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin