MySQL Variables have_statement_timeout 数据库 参数变量解释及正确配置使用

本站中文解释

MySQL参数变量have_statement_timeout指定MySQL服务器是否支持超时后中止语句的实现,此变量的可选值为YES和NO。

MySQL服务器支持运行时间(即服务器处理某个语句所需的时间)和会话超时(即单个逻辑会话的执行时间)作为一种超时选项。

它的设置方法为:

SET SESSION statement_timeout=value;

此语句可在新会话中指定当前会话的语句执行时间限制(以毫秒为单位)。

另外,也可以将have_statement_timeout设置为yes来允许执行超时,或设置为no来禁用执行超时。

SET GLOBAL have_statement_timeout=Value;

此语句可以设置服务器级别的超时限制,以毫秒为单位,但可以被当前会话中用户SET SESSION statement_timeout覆盖。

官方英文解释

have_statement_timeout

System Variable have_statement_timeout
Scope Global
Dynamic No
Type Boolean

Whether the statement execution timeout feature is available
(see Statement Execution Time Optimizer Hints). The
value can be NO if the background thread
used by this feature could not be initialized.


数据运维技术 » MySQL Variables have_statement_timeout 数据库 参数变量解释及正确配置使用