Settings profiles

    Example:

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

    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_bytes_to_read>100000000000</max_bytes_to_read>
    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_columns_to_read>25</max_columns_to_read>
    21. <max_temporary_columns>100</max_temporary_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. The web profile is a regular profile that can be set using the SET query or using a URL parameter in an HTTP query.