当前位置:网站首页>MySQL index --01--- design principle of index
MySQL index --01--- design principle of index
2022-07-01 02:55:00 【High high for loop】
Tips : When the article is finished , Directories can be generated automatically , How to generate it, please refer to the help document on the right
List of articles
- MySQL8.0 Index new features
- Which situations are suitable for creating indexes
- 1. There is a limit to the uniqueness of field values
- 2. Frequent act WHERE The field of the query condition
- 3. often GROUP BY and ORDER BY The column of
- 4. UPDATE、DELETE Of WHERE Conditional column
- 5. DISTINCT Fields need to be indexed
- 6. Multiple tables JOIN Connection operation , Precautions for index creation
- 7. Use the type of column to create a small index
- 8. Create an index using a string prefix
- 9. High discrimination ( High hashability ) The column of is suitable as an index
- 10. The most frequently used columns are placed on the left side of the federated index
- When multiple fields need to be indexed , Joint index is better than single value index
- Limit the number of indexes
- Which situations are not suitable for index creation
- 1. stay where Fields not used in , Don't set the index
- 2. It is better not to use index for tables with small data volume
- 3. Don't build indexes on columns with a lot of duplicate data
- 4. Avoid creating too many indexes on frequently updated tables
- 5. Unordered values are not recommended as indexes
- 6. Delete indexes that are no longer or rarely used
- 7. Do not define redundant or duplicate indexes
MySQL8.0 Index new features
2.1 Support descending index



2.2 Hide index


Which situations are suitable for creating indexes
1. There is a limit to the uniqueness of field values

2. Frequent act WHERE The field of the query condition

3. often GROUP BY and ORDER BY The column of

4. UPDATE、DELETE Of WHERE Conditional column


5. DISTINCT Fields need to be indexed

6. Multiple tables JOIN Connection operation , Precautions for index creation

7. Use the type of column to create a small index

8. Create an index using a string prefix



9. High discrimination ( High hashability ) The column of is suitable as an index

10. The most frequently used columns are placed on the left side of the federated index

When multiple fields need to be indexed , Joint index is better than single value index
Limit the number of indexes
Which situations are not suitable for index creation
1. stay where Fields not used in , Don't set the index

2. It is better not to use index for tables with small data volume


3. Don't build indexes on columns with a lot of duplicate data


4. Avoid creating too many indexes on frequently updated tables

5. Unordered values are not recommended as indexes

6. Delete indexes that are no longer or rarely used

7. Do not define redundant or duplicate indexes


边栏推荐
- 一文讲解发布者订阅者模式与观察者模式
- Cloud native annual technology inventory is released! Ride the wind and waves at the right time
- Gartner研究:在中国,混合云的采用已成为主流趋势
- 大橙子疯博客搬家通知
- [wechat applet development] style summary
- Here comes the share creators budding talent training program!
- Detailed data governance knowledge system
- An article explaining the publisher subscriber model and the observer model
- 【小程序项目开发--京东商城】uni-app之自定义搜索组件(上)
- How to open a stock account? Also, is it safe to open an account online?
猜你喜欢

servlet【初识】

RestCloud ETL实践之无标识位实现增量数据同步

基于Pytorch完整的训练一个神经网络并进行验证

Restcloud ETL practice to realize incremental data synchronization without identification bit

xxl-job使用指南

Saving images of different depths in opencv

Restcloud ETL data realizes incremental data synchronization through timestamp

Detailed explanation of pointer array and array pointer (comprehensive knowledge points)

Huawei operator level router configuration example | BGP VPLS and LDP VPLS interworking example

Multithreaded printing
随机推荐
Optimal Transport系列1
xxl-job使用指南
Gartner research: in China, the adoption of hybrid cloud has become the mainstream trend
通信协议——分类及其特征介绍
Huawei operator level router configuration example | BGP VPLS configuration example
robots.txt限制搜索引擎收录
Sampling Area Lights
【小程序项目开发-- 京东商城】uni-app之分类导航区域
STM32——一线协议之DS18B20温度采样
Nacos configuration center tutorial
彻底解决Lost connection to MySQL server at ‘reading initial communication packet
[PR # 5 A] two way running (state pressure DP)
php批量excel转word
Thread Detach
【PR #5 A】双向奔赴(状压DP)
ipmitool下载地址和编译安装时可能出现的问题
PTA 1017
Restcloud ETL实践之数据行列转换
大橙子疯博客搬家通知
Network address translation (NAT) technology

