tencent cloud

TDSQL Boundless

max_execution_time

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-03-27 15:04:32

Feature Description

max_execution_time is used to set the execution timeout duration for SELECT statements, in milliseconds. When the execution time of a SELECT statement exceeds the value set by max_execution_time, the query will be interrupted and an error will be returned.
Use cases of the max_execution_time parameter:
For read-only SELECT statements, the max_execution_time parameter applies to all queries unless the query contains the MAX_EXECUTION_TIME(N) optimizer hint or N is 0.
For non-read-only SELECT statements (for example, calling stored functions with side effects), the max_execution_time parameter does not apply.
For SELECT statements within stored programs, the max_execution_time parameter does not apply.
When adjusting the max_execution_time parameter, you need to consider the following factors:
Script execution time: Set appropriate values according to the actual execution time of the script. For scripts that take a long time to execute, the value of max_execution_time may need to be increased to ensure that the script can run normally. For scripts that take a short time to execute, the value of max_execution_time can be reduced to save system resources.
System resources: Set appropriate values according to the actual resource situation of the server. When resources are sufficient, the value of max_execution_time can be increased appropriately to improve script execution efficiency. In the case of resource shortage, the value of max_execution_time needs to be reduced to avoid resource exhaustion.
User experience: Set appropriate values according to the actual needs and experience of users. For applications with high requirements for user experience, the value of max_execution_time may need to be increased to ensure that script execution is completed within a reasonable time. For applications with low requirements for user experience, the value of max_execution_time can be reduced 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

Ajuda e Suporte

Esta página foi útil?

comentários