Settings Profiles

    Information

    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 , which ensures read-only access.

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

    Example:

    Install the web profile.

    Example:

    1. <!-- Settings profiles -->
    2. <profiles>
    3. <!-- Default settings -->
    4. <default>
    5. <!-- The maximum number of threads when running a single query. -->
    6. <max_threads>8</max_threads>
    7. </default>
    8. <!-- Settings for quries from the user interface -->
    9. <web>
    10. <max_rows_to_read>1000000000</max_rows_to_read>
    11. <max_rows_to_group_by>1000000</max_rows_to_group_by>
    12. <group_by_overflow_mode>any</group_by_overflow_mode>
    13. <max_rows_to_sort>1000000</max_rows_to_sort>
    14. <max_bytes_to_sort>1000000000</max_bytes_to_sort>
    15. <max_result_rows>100000</max_result_rows>
    16. <max_result_bytes>100000000</max_result_bytes>
    17. <result_overflow_mode>break</result_overflow_mode>
    18. <max_execution_time>600</max_execution_time>
    19. <min_execution_speed>1000000</min_execution_speed>
    20. <max_temporary_columns>100</max_temporary_columns>
    21. <max_temporary_non_const_columns>50</max_temporary_non_const_columns>
    22. <max_subquery_depth>2</max_subquery_depth>
    23. <max_pipeline_depth>25</max_pipeline_depth>
    24. <max_ast_depth>50</max_ast_depth>
    25. <max_ast_elements>100</max_ast_elements>
    26. <readonly>1</readonly>
    27. </web>

    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.