Skip to main content

settings

Contains information about session settings for current user.

Columns:

  • name (String) β€” Setting name.
  • value (String) β€” Setting value.
  • changed (UInt8) β€” Shows whether a setting is changed from its default value.
  • description (String) β€” Short setting description.
  • min (Nullable(String)) β€” Minimum value of the setting, if any is set via constraints. If the setting has no minimum value, contains NULL.
  • max (Nullable(String)) β€” Maximum value of the setting, if any is set via constraints. If the setting has no maximum value, contains NULL.
  • readonly (UInt8) β€” Shows whether the current user can change the setting:
    • 0 β€” Current user can change the setting.
    • 1 β€” Current user can’t change the setting.

Example

The following example shows how to get information about settings which name contains min_i.

SELECT *
FROM system.settings
WHERE name LIKE '%min_i%'
β”Œβ”€name────────────────────────────────────────┬─value─────┬─changed─┬─description───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─min──┬─max──┬─readonly─┐
β”‚ min_insert_block_size_rows β”‚ 1048576 β”‚ 0 β”‚ Squash blocks passed to INSERT query to specified size in rows, if blocks are not big enough. β”‚ ᴺᡁᴸᴸ β”‚ ᴺᡁᴸᴸ β”‚ 0 β”‚
β”‚ min_insert_block_size_bytes β”‚ 268435456 β”‚ 0 β”‚ Squash blocks passed to INSERT query to specified size in bytes, if blocks are not big enough. β”‚ ᴺᡁᴸᴸ β”‚ ᴺᡁᴸᴸ β”‚ 0 β”‚
β”‚ read_backoff_min_interval_between_events_ms β”‚ 1000 β”‚ 0 β”‚ Settings to reduce the number of threads in case of slow reads. Do not pay attention to the event, if the previous one has passed less than a certain amount of time. β”‚ ᴺᡁᴸᴸ β”‚ ᴺᡁᴸᴸ β”‚ 0 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Using of WHERE changed can be useful, for example, when you want to check:

  • Whether settings in configuration files are loaded correctly and are in use.
  • Settings that changed in the current session.
SELECT * FROM system.settings WHERE changed AND name='load_balancing'

See also

Original article