Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

71.25. ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded

		
mysql> select * from cert;
ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
mysql> SET GLOBAL max_execution_time=10;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from cert;
Empty set (0.08 sec)

mysql> show variables like 'max_execution_time';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| max_execution_time | 10    |
+--------------------+-------+
1 row in set (0.01 sec)

mysql> select /*+ max_execution_time(3000)*/ count(*) from cert;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.29 sec)