Skip to content

Commit c83d3b3

Browse files
-f Added missing available quota fields to documentation
1 parent a1cd851 commit c83d3b3

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/en/operations/quotas.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ The resource consumption calculated for each interval is output to the server lo
5757
<queries>1000</queries>
5858
<query_selects>100</query_selects>
5959
<query_inserts>100</query_inserts>
60+
<written_bytes>5000000</written_bytes>
6061
<errors>100</errors>
6162
<result_rows>1000000000</result_rows>
6263
<read_rows>100000000000</read_rows>
6364
<execution_time>900</execution_time>
65+
<failed_sequential_authentications>5</failed_sequential_authentications>
6466
</interval>
6567

6668
<interval>
@@ -71,7 +73,9 @@ The resource consumption calculated for each interval is output to the server lo
7173
<query_inserts>10000</query_inserts>
7274
<errors>1000</errors>
7375
<result_rows>5000000000</result_rows>
76+
<result_bytes>160000000000</result_bytes>
7477
<read_rows>500000000000</read_rows>
78+
<result_bytes>16000000000000</result_bytes>
7579
<execution_time>7200</execution_time>
7680
</interval>
7781
</statbox>
@@ -93,10 +97,18 @@ Here are the amounts that can be restricted:
9397

9498
`result_rows` – The total number of rows given as a result.
9599

100+
`result_bytes` - The total size of rows given as a result.
101+
96102
`read_rows` – The total number of source rows read from tables for running the query on all remote servers.
97103

104+
`read_bytes` - The total size read from tables for running the query on all remote servers.
105+
106+
`written_bytes` - The total size of a writing operation.
107+
98108
`execution_time` – The total query execution time, in seconds (wall time).
99109

110+
`failed_sequential_authentications` - The total number of sequential authentication errors.
111+
100112
If the limit is exceeded for at least one time interval, an exception is thrown with a text about which restriction was exceeded, for which interval, and when the new interval begins (when queries can be sent again).
101113

102114
Quotas can use the "quota key" feature to report on resources for multiple keys independently. Here is an example of this:

docs/en/sql-reference/statements/create/quota.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ CREATE QUOTA [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_name]
1515
[IN access_storage_type]
1616
[KEYED BY {user_name | ip_address | client_key | client_key,user_name | client_key,ip_address} | NOT KEYED]
1717
[FOR [RANDOMIZED] INTERVAL number {second | minute | hour | day | week | month | quarter | year}
18-
{MAX { {queries | query_selects | query_inserts | errors | result_rows | result_bytes | read_rows | read_bytes | execution_time} = number } [,...] |
18+
{MAX { {queries | query_selects | query_inserts | errors | result_rows | result_bytes | read_rows | read_bytes | written_bytes | execution_time | failed_sequential_authentications} = number } [,...] |
1919
NO LIMITS | TRACKING ONLY} [,...]]
2020
[TO {role [,...] | ALL | ALL EXCEPT role [,...]}]
2121
```
2222

2323
Keys `user_name`, `ip_address`, `client_key`, `client_key, user_name` and `client_key, ip_address` correspond to the fields in the [system.quotas](../../../operations/system-tables/quotas.md) table.
2424

25-
Parameters `queries`, `query_selects`, `query_inserts`, `errors`, `result_rows`, `result_bytes`, `read_rows`, `read_bytes`, `execution_time`, `failed_sequential_authentications` correspond to the fields in the [system.quotas_usage](../../../operations/system-tables/quotas_usage.md) table.
25+
Parameters `queries`, `query_selects`, `query_inserts`, `errors`, `result_rows`, `result_bytes`, `read_rows`, `read_bytes`, `written_bytes`, `execution_time`, `failed_sequential_authentications` correspond to the fields in the [system.quotas_usage](../../../operations/system-tables/quotas_usage.md) table.
2626

2727
`ON CLUSTER` clause allows creating quotas on a cluster, see [Distributed DDL](../../../sql-reference/distributed-ddl.md).
2828

0 commit comments

Comments
 (0)