当前位置:网站首页>Differences between in and exists in MySQL
Differences between in and exists in MySQL
2022-07-01 06:02:00 【It's very quiet】
MySQL Medium in The statement is to make the appearance and the inner table as hash Connect , and exists A statement is an external statement loop loop , Every time loop Loop and query the inner table . Use scenarios :
If the two tables in the query are the same size , Then use in and exists Not much difference .
If one of the two tables is smaller , One is a big watch , Then the sub query table is very useful exists, Small use of subquery table in.
not in and not exists: If the query statement uses not in, Then the internal and external tables are scanned , No index is used ; and not extsts The subquery of can still use the index on the table . So no matter which watch is big , use not exists All ratio not in Be quick .
边栏推荐
- Database problems, how to optimize Oracle SQL query statements faster and more efficient
- Bat operation FTP upload and download command
- LED lighting used in health lighting
- 指数法和Random Forest实现山东省丰水期地表水体信息
- How to transmit and share 4GB large files remotely in real time?
- 蚂蚁新村田头村变甜头村 让厦门灌口镇田头村变甜头村的特色农产品之一是
- Code shoe set - mt3114 · interesting balance - explain it with examples
- MySQL里记录货币
- Small guide for rapid completion of mechanical arm (VI): stepping motor driver
- Don't put your notes and videos everywhere!
猜你喜欢

excel初级应用案例——杜邦分析仪

How to add a gourd pie plate

ArcServer密码重置(账号不可以重置)

表格中el-tooltip 实现换行展示

Why use huluer pie disk instead of U disk?

芯片,建立在沙粒上的帝国!

Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills

Dear pie users, I want to confess to you!

数据库问题,如何优化Oracle SQL查询语句更快,效率更高

MySQL数据迁移遇到的一些错误
随机推荐
不是你脑子不好用,而是因为你没有找到对的工具
Linux closes the redis process SYSTEMd+
MySQL怎么存储emoji?
Advanced cross platform application development (II): uni app practice
My experience from technology to product manager
The row and column numbers of each pixel of multi-source grid data in the same area are the same, that is, the number of rows and columns are the same, and the pixel size is the same
c# Xml帮助类
DEV XPO对比之XAF BO
FPGA - 7系列 FPGA内部结构之Clocking -02- 时钟布线资源
DEV XPO对比之UOW
解决麒麟V10上传文件乱码问题
Seven major technical updates that developers should pay most attention to on build 2022
Huluer app help
2022 年面向初学者的 10 大免费 3D 建模软件
OpenGL ES: (2) OpenGL ES 与 EGL、GLSL的关系
Dear pie users, I want to confess to you!
FPGA - 7系列 FPGA内部结构之Clocking -01- 时钟架构概述
SystemVerilog学习-09-进程间同步、通信和虚方法
LeetCode 最大矩形,最大正方形系列 84. 85. 221. 1277. 1725. (单调栈,动态规划)
这才是大学生必备软件 | 知识管理