Skip to main content

Settings Profiles

A settings profile is a collection of settings grouped under the same name.


ClickHouse also supports SQL-driven workflow for managing settings profiles. We recommend using it.

The profile can have any name. You can specify the same profile for different users. The most important thing you can write in the settings profile is readonly=1, which ensures read-only access.

Settings profiles can inherit from each other. To use inheritance, indicate one or multiple profile settings before the other settings that are listed in the profile. In case when one setting is defined in different profiles, the latest defined is used.

To apply all the settings in a profile, set the profile setting.


Install the web profile.

SET profile = 'web'

Settings profiles are declared in the user config file. This is usually users.xml.


<!-- Settings profiles -->
<!-- Default settings -->
<!-- The maximum number of threads when running a single query. -->

<!-- Settings for queries from the user interface -->









The example specifies two profiles: default and web.

The default profile has a special purpose: it must always be present and is applied when starting the server. In other words, the default profile contains default settings.

The web profile is a regular profile that can be set using the SET query or using a URL parameter in an HTTP query.