12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
ADADADADAD
mysql数据库 时间:2024-11-26 22:16:48
作者:文/会员上传
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
12-09
mysql 5.6 及以后,有语句执行超时时间变量,用于在服务端对 select 语句进行超时时间限制;mysql 5.6 中,名为: max_statement_time (毫秒)mysql 5.7 以后,改成:max_execution_time (毫
以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。
mysql 5.6 及以后,有语句执行超时时间变量,用于在服务端对 select 语句进行超时时间限制;
mysql 5.6 中,名为: max_statement_time (毫秒)
mysql 5.7 以后,改成:max_execution_time (毫秒)
超过这个时间,mysql 就终止 select 语句的执行,客户端抛异常:
1907: Query execution was interrupted, max_execution_time exceeded.
三种设置粒度:
(1)全局设置
SET GLOBAL MAX_EXECUTION_TIME=1000;
(2)对某个session设置
SET SESSION MAX_EXECUTION_TIME=1000;
(3)对某个语句设置
SELECT max_execution_time=1000 SLEEP(10), a.* from test a;
11-20
11-19
11-20
11-20
11-20
11-19
11-20
11-20
11-19
11-20
11-19
11-19
11-19
11-19
11-19
11-19