当前位置:网站首页>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 .
边栏推荐
- 论文学习记录随笔 多标签之LIFT
- Database problems, how to optimize Oracle SQL query statements faster and more efficient
- 穿越派·派盘 + Mountain Duck = 数据本地管理
- restframework-simpleJWT重写认证机制
- Pla ne colle pas sur le lit: 6 solutions simples
- skywalking集成nacos动态配置
- Fragment upload and breakpoint resume
- SOE空间分析服务器 MySQL以及PostGres的地理空间库PostGIS防注入攻击
- kotlin位运算的坑(bytes[i] and 0xff 报错)
- Servlet
猜你喜欢

LeetCode 最大矩形,最大正方形系列 84. 85. 221. 1277. 1725. (单调栈,动态规划)

Diagramme dynamique Excel

Advanced drawing skills of Excel lecture 100 (1) - use Gantt chart to show the progress of the project

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

Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)

What if the data in the cloud disk is harmonious?

Talking from mlperf: how to lead the next wave of AI accelerator

3D printer threading: five simple solutions

Call us special providers of personal cloud services for College Students

ONEFLOW source code parsing: automatic inference of operator signature
随机推荐
π盘,让您电脑变成个人的私有云
Through cooperation with the University of international trade, we can increase efficiency for college students
ArcServer密码重置(账号不可以重置)
TiDB单机模拟部署生产环境集群(闭坑实践,亲测有效)
健康照明中应用的LED照明灯
MySQL怎么存储emoji?
Scope data export mat
skywalking集成nacos动态配置
Dear pie users, I want to confess to you!
数据库问题,如何优化Oracle SQL查询语句更快,效率更高
Oracle sequence + trigger
excel可视化
Don't put your notes and videos everywhere!
可动的机械挂钟
C language beginner level - realize the minesweeping game
OpenGL ES: (5) OpenGL的基本概念、OpenGL ES 在屏幕产生图片的过程、OpenGL管线(pipeline)
Seven major technical updates that developers should pay most attention to on build 2022
如何添加葫芦儿派盘
Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)
Crossing pie · pie pan + Mountain duck = local data management