当前位置:网站首页>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:
边栏推荐
猜你喜欢

Oracle数据库SQL优化详解

Detailed introduction to the usage of Nacos configuration center

SSTI range

protobuf编码及网络通信应用(一)

十八、Kotlin进阶学习:1、挂起函数执行的顺序;2、使用 async 和 await 异步执行挂起函数;3、协程的调度器;4、父子协程;

MySQL - Function and Constraint Commands

mysql不是内部或外部命令,也不是可运行的程序或批处理文件解决

第一个WebAssembly程序

FastAPI Quick Start
Misc of CTF-Memory Analysis (Volatility)
随机推荐
互联网商城盲盒app为何如此火爆
Arthas command parsing (watch/tt/sc)
Servlet基本原理与常见API方法的应用
Arrays工具类的使用
【OS】操作系统高频面试题英文版(1)
The number of warehouse 】 data quality
使用PyQt5为YoloV5添加界面(一)
POI工具类
Servlet basic principles and application of common API methods
十九、Kotlin进阶学习:1、管道数据的收和发;2、管道的关闭;3、生产者和消费者;4、管道的缓存区;
TDengineGUI cannot connect to TDengine
史上超强最常用SQL语句大全
JVM Learning (2) Garbage Collector
vulnhub-XXE ctf security question
MySQL - Function and Constraint Commands
学生成绩管理系统(C语言版)
MySQL storage engine
C#中对委托的理解和使用
FastAPI Quick Start
根据ip地址获取地理位置及坐标(离线方式)