Skip to main content

quotas

Contains information about quotas.

Columns:

  • name (String) β€” Quota name.
  • id (UUID) β€” Quota ID.
  • storage(String) β€” Storage of quotas. Possible value: β€œusers.xml” if a quota configured in the users.xml file, β€œdisk” if a quota configured by an SQL-query.
  • keys (Array(Enum8)) β€” Key specifies how the quota should be shared. If two connections use the same quota and key, they share the same amounts of resources. Values:
    • [] β€” All users share the same quota.
    • ['user_name'] β€” Connections with the same user name share the same quota.
    • ['ip_address'] β€” Connections from the same IP share the same quota.
    • ['client_key'] β€” Connections with the same key share the same quota. A key must be explicitly provided by a client. When using clickhouse-client, pass a key value in the --quota_key parameter, or use the quota_key parameter in the client configuration file. When using HTTP interface, use the X-ClickHouse-Quota header.
    • ['user_name', 'client_key'] β€” Connections with the same client_key share the same quota. If a key isn’t provided by a client, the qouta is tracked for user_name.
    • ['client_key', 'ip_address'] β€” Connections with the same client_key share the same quota. If a key isn’t provided by a client, the qouta is tracked for ip_address.
  • durations (Array(UInt64)) β€” Time interval lengths in seconds.
  • apply_to_all (UInt8) β€” Logical value. It shows which users the quota is applied to. Values:
    • 0 β€” The quota applies to users specify in the apply_to_list.
    • 1 β€” The quota applies to all users except those listed in apply_to_except.
  • apply_to_list (Array(String)) β€” List of user names/roles that the quota should be applied to.
  • apply_to_except (Array(String)) β€” List of user names/roles that the quota should not apply to.

See Also​

Original article