当前位置:网站首页>MySQL delete in without index
MySQL delete in without index
2022-06-26 06:33:00 【Oriental phantom】
Sentence format :
explain delete from enrollee where enrollee_id in (select uid from dup_super_id where delete_ind=1);
There are not many subqueries , The external table is a large table . Initially, the execution plan is a full table scan .

analyze table Or subqueries are indexed , The attributes of the associated fields of the internal and external tables are also consistent , Just don't go to the index .
Thought of the writing method . use inner join try :
explain delete a from enrollee a inner join dup_super_id b where a.enrollee_id=b.uid and b.delete_ind=1;
Why? delete no way ?
1. Thought of a previous error report :
“SQL Delete statement add table alias :DELETE FROM table_name t WHERE t.id=1; Wrong report .
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't where t.id=1' at line 1
reason , When deleting a statement, either do not
边栏推荐
- Work accumulation - problems encountered in using ThreadLocal in web requests
- typescript的class结合接口(interface)的简单使用
- MYSQL索引不生效的原因
- 成水最多的容器
- Gof23 - builder mode
- Go language learning notes 1.2- variables
- Thinking skills of technical leaders
- Dpdk - tcp/udp protocol stack server implementation (I)
- 消息队列-功能、性能、运维对比
- Handwritten background management framework template (I)
猜你喜欢

PyTorch使用多GPU并行训练及其原理和注意事项
Web components series (10) -- realize the basic layout of mycard

MySQL 数据库的小白安装与登录

数据治理工作的几种推进套路

100 cases of go language

Pytorch uses multi GPU parallel training and its principle and precautions

Go语言学习笔记 1.1

Library management system

Zotero文献管理工具之Jasminum(茉莉花)插件
Customer Stories | Netease spring breeze: the "spring breeze" of the fun industry, reaching out to all areas through in-depth interaction
随机推荐
MVC source code sharing
Prometheus和Zabbix的对比
MYSQL索引不生效的原因
[spark] how to implement spark SQL field blood relationship
Thinking and summary of technical ability
打印数字的位信息
Usage of zip (*arg)
Custom reference formats used by Zotero
Message queue - message transaction management comparison
营销技巧:相比较讲产品的优点,更有效的是要向客户展示使用效果
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
如何设计好的技术方案
Gof23 - factory mode
架构设计方法
EFK昇級到ClickHouse的日志存儲實戰
GoF23—建造者模式
Web components series (10) -- realize the basic layout of mycard
浏览器的四大内核:Trident,Gecko,Webkit,Blink
【golang】time相关
Design and practice of low code real-time data warehouse construction system