当前位置:网站首页>MySQL single table access method
MySQL single table access method
2022-06-28 07:55:00 【star++】
summary
The so-called access method is that you want to find a pile of data , And then put sql Throw it to mysql, then mysql According to your watch ( Indexes , Data volume , Query cost ), give mysql I think the best way to execute , This is the access method .mysql Give these execution methods their own names , Namely :const,
ref,ref_or_null,range,index,all,index merge
Equivalent query ( Single field single value )( Walk a single index )
1.const Method
select * from user where id=? //id It's the primary key ( Cluster index )
select * from user where stu_id=? // Student ID is the unique index ( Secondary indexes )
1. If the query condition is Primary key or unique index , So the way to access the table is const
2. Generally speaking, it is a method to retrieve a record , be used const
3. If the primary key or unique index is multi column , So many columns must be equal , This is when const
4. If the primary key and unique index retrieve null边栏推荐
- Investment transaction and settlement of the fund
- Ambari (V) ---ambari integrated Azkaban (valid for personal test)
- A single node obtains the lock lock of the order number
- Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
- Localization SoC development plan
- How redis solves cache avalanche, breakdown and penetration problems
- HJ明明的随机数
- Software design of power control board
- Is it reliable for securities companies to register and open accounts? Is it safe?
- 逆波兰表达式求值<难度系数>
猜你喜欢

【js】-【DFS、BFS应用】-学习笔记

Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)

Online WPS tool

Idea package together, using compact middle packages to solve &

数字藏品市场“三大套路”

Software testing and quality final review

Porting ucosiii to stm32f429

Hash slot of rediscluster cluster cluster implementation principle

Airflow2.1.1 summary of the pits stepped on in actual combat!!

SOC clock configuration
随机推荐
Es data export CSV file
Host is not allowed to connect to this MySQL server
Localization SoC development plan
Today's notes 22/1/7
8 张图 | 剖析 Eureka 的首次同步注册表
Block transmission by golang gin framework
Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
Tencent continued to lay off staff in the second half of the year, and all business groups reduced by at least 10%. What do you think of this? Followers
2021 programming language ranking summary
Soft test -- software designer -- database design of afternoon questions
Configuring MySQL multi instance master-slave synchronization for Linux
HJ字符串排序
Airflow2.1.1 summary of the pits stepped on in actual combat!!
Idea package together, using compact middle packages to solve &
Porting ucosiii to stm32f429
Is it reliable for flush to register and open an account? Is it safe?
Uninstall and reinstall the latest version of MySQL database. The test is valid
Generation and verification of JWT token
Update pip to the latest version
Redis one master multi slave cluster setup