当前位置:网站首页>MySQL special statement and optimizer
MySQL special statement and optimizer
2022-07-30 06:55:00 【If I don't see you tomorrow】
SQL_NO_CACHE
/*!40001 SQL_NO_CACHE */ means executing SELECT SQL_NO_CACHE * FROM mytable in mysql >= 4.0.1 and not executing the command in earlier versionswith SQL_NO_CACHE.
SELECT /*!40001 SQL_NO_CACHE */ * FROM `test`.`house`; The query cache was deprecated in MySQL 5.7.20 and removed in MySQL 8.0.
SLEEP
Sleep (pause) duration for the number of seconds given by the parameter, then return 0.Duration may have fractional parts.If the argument is NULL or negative, SLEEP() produces a warning or an error in strict SQL mode.
select *,sleep(n) from table,
If the table record is empty, it will not sleep; if the table record is one, the sleep time is 1n, ifThe table record is x, and the sleep time is: xn.
MAX_EXECUTION_TIME
sql sets the MAX_EXECUTION_TIME parameter to control the execution time of the statement. If the execution is not completed within this time range, the operation will be terminated
show variables like 'max_execution_time';You can viewmax_execution_timeconfiguration, MySQL 5.7.8+ version supports this parameter
SELECT /*+ MAX_EXECUTION_TIME(1000) */1 FROM t1 WHERE SLEEP(1000);> ERROR 3024 (HY000): Query execution was interrupted, maximum statement> execution time exceededReferences:
边栏推荐
- Flink-流/批/OLAP一体得到Flink引擎
- TDengineGUI无法连接TDengine
- [Net Ding Cup 2020 Qinglong Group] AreUSerialz
- 【数仓】数据仓库高频面试题题英文版(1)
- MySQL achievement method 】 【 5 words, single table SQL queries
- Nacos配置中心用法详细介绍
- SQL Server安装教程
- Online sql editing query tool sql-editor
- The number of warehouse 】 data quality
- GraphQL (1) Basic introduction and application examples
猜你喜欢
随机推荐
MySQL 特殊语句及优化器
[Net Ding Cup 2020 Qinglong Group] AreUSerialz
Invalid bound statement (not found)出现的原因和解决方法
Solution to TypeError The view function did not return a valid response. The function either returned None
shardingsphere 分库分表及配置示例
JVM学习(二) 垃圾收集器
MySQL - Multi-table query and case detailed explanation
protobuf编码及网络通信应用(一)
MySQL - 函数及约束命令
Understand JDBC in one article
misc-file steganography of CTF
【零基础搞定C语言——导航汇总篇】
十八、Kotlin进阶学习:1、挂起函数执行的顺序;2、使用 async 和 await 异步执行挂起函数;3、协程的调度器;4、父子协程;
3 minutes to tell you how to become a hacker | Zero foundation to hacker introductory guide, you only need to master these five skills
Calendar类的习题
sql中 exists的用法
Reasons and solutions for Invalid bound statement (not found)
FastAPI Quick Start
Using PyQt5 to add an interface to YoloV5 (1)
十七、Kotlin进阶学习:1、守护线程;2、线程和协程之间的效率对比;3、取消协程;







![[PASECA2019]honey_shop](/img/8f/7161a63dab10dc02fef1fea075401a.png)
