当前位置:网站首页>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


边栏推荐
- Voici le programme de formation des talents de SHARE Creators!
- Huawei operator level router configuration example | BGP VPLS configuration example
- How do I hide div on Google maps- How to float a div over Google Maps?
- Network address translation (NAT) technology
- 【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
- DenseNet网络论文学习笔记
- PCB defect detection based on OpenCV and image subtraction
- 一文讲解发布者订阅者模式与观察者模式
- Youmeng (a good helper for real-time monitoring of software exceptions: crash) access tutorial (the easiest tutorial for Xiaobai with some foundation)
- Nacos configuration center tutorial
猜你喜欢

Share Creators萌芽人才培养计划来了!

Communication protocol -- Classification and characteristics Introduction
![Servlet [first introduction]](/img/2a/aff3b93e43550d30a33c1683210d3a.png)
Servlet [first introduction]

MnasNet学习笔记
![[machine learning] vectorized computing -- a must on the way of machine learning](/img/3f/d672bb254f845ea705b3a0ca10ee19.png)
[machine learning] vectorized computing -- a must on the way of machine learning

UE4渲染管线学习笔记

Pychart software deployment gray unable to point

Restcloud ETL data realizes incremental data synchronization through timestamp

Huawei operator level router configuration example | BGP VPLS configuration example

通信协议——分类及其特征介绍
随机推荐
[applet project development -- Jingdong Mall] user defined search component of uni app (Part 1)
Cloud native annual technology inventory is released! Ride the wind and waves at the right time
Densenet network paper learning notes
[applet project development -- JD mall] uni app commodity classification page (first)
Huawei operator level router configuration example | configuration static VPLS example
Pychar open remote directory remote host
基于OPENCV和图像减法的PCB缺陷检测
彻底解决Lost connection to MySQL server at ‘reading initial communication packet
鼠标悬停效果四
Thread Detach
Is it safe to open an account online in a small securities firm? Will my money be unsafe?
Ipmitool download address and possible problems during compilation and installation
Mouse over effect V
UE4 rendering pipeline learning notes
import tensorflow. contrib. Slim as slim error
LeetCode_栈_困难_227.基本计算器(不含乘除)
一文讲解发布者订阅者模式与观察者模式
Huawei operator level router configuration example | BGP VPLS configuration example
Poj-3486-computers[dynamic planning]
PCB defect detection based on OpenCV and image subtraction

