当前位置:网站首页>Index push down (ICP) for mysql5.6
Index push down (ICP) for mysql5.6
2022-06-13 07:33:00 【A hard-working dog】
MySQL Study ----ICP( Index push down )
The original address of the official website :
https://dev.mysql.com/doc/refman/8.0/en/index-condition-pushdown-optimization.html
If work :
Create a student transcript ,
Index
create index id_name on student(name);
explain
SELECT *
FROM school.student
where name>'z' and name like '%a';
One . What is? ICP
ICP The index push down function is mysql5.6 The query optimization strategy , Put what was originally server The index condition judgment made by the layer , Push down to the storage engine layer , It can reduce the number and number of times that the storage engine must access the base table MySQL The number of times the server has to access the storage engine ., Improve query efficiency
Why do I need to push down the index
There is no index push down step
- server The layer first calls the interface of the storage engine to locate the first secondary record that meets the interval forming the scanning interval ( This sql Next is name>‘z’)
- The storage engine is based on B+ After the tree index quickly locates this secondary index record , Return to the table according to the primary key value of the secondary index record , Return the complete record to server layer
- server The layer then judges whether other search conditions are true , If yes, send it to the client , Otherwise, skip this record , Then ask the storage engine for the next record
- Until all records in the scanning section are scanned
With the next step of index push down - server The layer first calls the interface of the storage engine to locate the first secondary record that meets the interval forming the scanning interval .
- The storage engine is based on B+ After the tree index quickly locates this secondary record , Not in a hurry to return to the table , But first judge all about name Whether the columns contained in the index are valid , That is to say name>‘z’ and name like ‘%a’
Is it true , If not, skip the record , Go to the next index record , Report back when established . - setver Then judge whether other search conditions are true , Return to the client after establishment , If not, skip , Then judge the next record of the storage engine back to the table .
- Until all records in the scanning section are scanned
save I/0 The place of
Because every time you perform a table return operation , You need to load a clustered index page into memory , This eliminates the need for multiple table return operations , Saved I/O.
How to know if there is an index push down :
View the execution plan Extra:Using index condition
The storage engine stores the conditions for judgment
All judgment conditions related to the index
边栏推荐
- Powerdispatcher reverse generation of Oracle data model
- Considerations for using redis transactions
- 25个国内外文献数据库
- EF core execute SQL statement
- 25 domestic and foreign literature databases
- Ticdc synchronization task
- An example of CSRF attack defense in web application scenarios
- C language: how to give an alias to a global variable?
- Compare advantages and disadvantages of DFS and BFS and name vocabulary
- Que se passe - t - il si les produits financiers sont nuls pendant plusieurs jours?
猜你喜欢
RT thread simulator lvgl control: switch switch button control
Some optimization for seckill project
powerdisgner逆向生成oracle数据模型
Redis learning journey --redis Conf details
[log4j2 log framework] sensitive character filtering
Related operations under Oracle Database
redis-5. Redis' RDB, fork, copyonwrite, AOF, RDB & AOF are mixed
Table access among Oracle database users
Redis learning journey -- subscription and publishing
redis-1. Install redis with pictures and texts
随机推荐
Performance tuning can't just depend on tapping the brain
C # using multithreading
TCP协议的三次握手过程和四次挥手过程以及为什么要这样? ------一二熊猫
QT读取SQLserver数据库
I always don't understand the high address and high position
Login registration
Distributed transaction learning (I) preliminary understanding
【splishsplash】重复输出splashsurf的脚本
Functions about Oracle.
Export chrome plug-ins and import local plug-ins to chrome
关于#数据库#的问题:PGADMIN4 编辑sql窗口问题
Considerations for using redis transactions
. Net code to implement get request and post request
Lightning data import
【ViveFocus使用WaveVR插件获取手柄操作事件】
Reflection of C # Foundation
Fundamentals of assembly language: register and addressing mode
10. process communication
Personal JS learning notes
[log4j2 log framework] sensitive character filtering