tencent cloud

TDSQL Boundless

max_execution_time

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-05-26 16:30:18

Feature Description

max_execution_time sets the execution timeout for SELECT statements, measured in milliseconds. When the execution time of a SELECT statement exceeds the value set by max_execution_time, the query is terminated and an error is returned.
max_execution_time parameter application scenarios:
For read-only SELECT statements, the max_execution_time parameter is applied to all queries, unless the query contains the MAX_EXECUTION_TIME(N) optimizer hint or N is 0.
The max_execution_time parameter does not apply to non-read-only SELECT statements, such as those that invoke stored functions with side effects.
The max_execution_time parameter is not applicable to SELECT statements within stored programs.
When the max_execution_time parameter is adjusted, consider the following factors:
Script execution time: Set an appropriate value based on the script's actual execution time. For scripts with long execution times, you may need to increase the value of max_execution_time to ensure the script runs properly. For scripts with short execution times, you can reduce the value of max_execution_time to conserve system resources.
System resources: Set an appropriate value based on the server's actual resource conditions. When resources are sufficient, you can appropriately increase the value of max_execution_time to improve script execution efficiency. When resources are constrained, you need to reduce the value of max_execution_time to avoid resource exhaustion.
User experience: Set an appropriate value based on the user's actual needs and experience. For applications with high user experience requirements, you may need to increase the value of max_execution_time to ensure the script completes execution within a reasonable time. For applications with low user experience requirements, you can reduce the value of max_execution_time to improve system performance.

Attribute Description

Required
Description
Parameter Type
ULONG
Default Value
0
Value Range
0 ~ 18446744073709551615
Effective Scope
GLOBAL
SESSION
Restart Required
No

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック