Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/user-guide/protocols/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ SELECT @@system_time_zone, @@time_zone;
```

For information on how the time zone affects data inserts and queries, please refer to the SQL documents in the [Ingest Data](/user-guide/ingest-data/for-iot/sql.md#time-zone) and [Query Data](/user-guide/query-data/sql.md#time-zone) sections.

## Query Timeout

You can set the `max_execution_time` variable for the current session using SQL statement `SET max_execution_time = <value>` or `SET MAX_EXECUTION_TIME = <value>`, which specifies the maximum time in milliseconds for a **read-only statement** to execute. The server will terminate the query if it exceeds the specified time.

For example, to set the maximum query execution time to 10 seconds:

```SQL
SET max_execution_time=10000;
```
10 changes: 10 additions & 0 deletions docs/user-guide/protocols/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,13 @@ SELECT
count(latency)
FROM ft_grpc_latencies GROUP BY host, t;
```

## Statement Timeout

You can set the `statement_timeout` variable for the current session using SQL statement `SET statement_timeout = <value>` or `SET STATEMENT_TIMEOUT = <value>`, which specifies the maximum time in milliseconds for a statement to execute. The server will terminate the statement if it exceeds the specified time.

For example, to set the maximum execution time to 10 seconds:

```SQL
SET statement_timeout=10000;
```
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ SELECT @@system_time_zone, @@time_zone;
```

有关时区如何影响数据的插入和查询,请参考 [写入数据](/user-guide/ingest-data/for-iot/sql.md#时区) 和 [查询数据](/user-guide/query-data/sql.md#时区) 中的 SQL 文档。

## 查询超时

可以通过 SQL 语句 `SET max_execution_time = <value>` 或 `SET MAX_EXECUTION_TIME = <value>` 为当前会话设置 `max_execution_time` 变量,该变量指定**只读语句**执行的最大时间(以毫秒为单位)。如果查询的执行时间超过指定时间,服务器将终止该查询。

例如,将最大执行时间设置为 10 秒:

```SQL
SET max_execution_time=10000;
```
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,13 @@ SELECT
count(latency)
FROM ft_grpc_latencies GROUP BY host, t;
```

## 语句执行超时

你可以通过 SQL 语句 `SET statement_timeout = <value>` 或 `SET STATEMENT_TIMEOUT = <value>` 为当前会话设置 `statement_timeout` 变量,该变量指定语句执行的最大时间(以毫秒为单位)。如果语句的执行时间超过指定时间,服务器将终止该语句。

例如,将最大执行时间设置为 10 秒:

```SQL
SET statement_timeout=10000;
```
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ SELECT @@system_time_zone, @@time_zone;
```

有关时区如何影响数据的插入和查询,请参考 [写入数据](/user-guide/ingest-data/for-iot/sql.md#时区) 和 [查询数据](/user-guide/query-data/sql.md#时区) 中的 SQL 文档。

## 查询超时

可以通过 SQL 语句 `SET max_execution_time = <value>` 或 `SET MAX_EXECUTION_TIME = <value>` 为当前会话设置 `max_execution_time` 变量,该变量指定**只读语句**执行的最大时间(以毫秒为单位)。如果查询的执行时间超过指定时间,服务器将终止该查询。

例如,将最大执行时间设置为 10 秒:

```SQL
SET max_execution_time=10000;
```
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,13 @@ SELECT
count(latency)
FROM ft_grpc_latencies GROUP BY host, t;
```

## 语句执行超时

你可以通过 SQL 语句 `SET statement_timeout = <value>` 或 `SET STATEMENT_TIMEOUT = <value>` 为当前会话设置 `statement_timeout` 变量,该变量指定语句执行的最大时间(以毫秒为单位)。如果语句的执行时间超过指定时间,服务器将终止该语句。

例如,将最大执行时间设置为 10 秒:

```SQL
SET statement_timeout=10000;
```
10 changes: 10 additions & 0 deletions versioned_docs/version-0.15/user-guide/protocols/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ SELECT @@system_time_zone, @@time_zone;
```

For information on how the time zone affects data inserts and queries, please refer to the SQL documents in the [Ingest Data](/user-guide/ingest-data/for-iot/sql.md#time-zone) and [Query Data](/user-guide/query-data/sql.md#time-zone) sections.

## Query Timeout

You can set the `max_execution_time` variable for the current session using SQL statement `SET max_execution_time = <value>` or `SET MAX_EXECUTION_TIME = <value>`, which specifies the maximum time in milliseconds for a **read-only statement** to execute. The server will terminate the query if it exceeds the specified time.

For example, to set the maximum query execution time to 10 seconds:

```SQL
SET max_execution_time=10000;
```
10 changes: 10 additions & 0 deletions versioned_docs/version-0.15/user-guide/protocols/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,13 @@ SELECT
count(latency)
FROM ft_grpc_latencies GROUP BY host, t;
```

## Statement Timeout

You can set the `statement_timeout` variable for the current session using SQL statement `SET statement_timeout = <value>` or `SET STATEMENT_TIMEOUT = <value>`, which specifies the maximum time in milliseconds for a statement to execute. The server will terminate the statement if it exceeds the specified time.

For example, to set the maximum execution time to 10 seconds:

```SQL
SET statement_timeout=10000;
```