当前位置:网站首页>MySQL -- index principle + how to use
MySQL -- index principle + how to use
2022-07-03 10:48:00 【Samooyou】
One 、 Introduce
Why an index ?
General application system , The proportion of reading and writing is 10:1 about , And insert operations and general update operations rarely have performance problems , In the production environment , We met the most , It's also the most problematic , Or some complex query operations , Therefore, the optimization of query statements is obviously the top priority . Speaking of accelerating query , I have to mention index .
What is index ?
Index in MySQL Also known as “ key ”, It is a data structure used by the storage engine to quickly find records . Indexing for good performance
It's critical , Especially when there is more and more data in the table , The impact of indexes on performance is increasingly important .
Index optimization should be the most effective way to optimize query performance . Indexes can easily improve query performance by several orders of magnitude .
Index the phonetic order of a dictionary , If you want to find a word , If you don't use a sound sequence table , It needs to be checked page by page from hundreds of pages .
Do you have any misunderstanding about index ?
Indexing is an important aspect of application design and development . If there are too many indexes , The performance of the application may be affected . There are too few indexes , It also has an impact on query performance , To find a balance , This is critical to the performance of the application . Some developers always think of adding indexes after the fact ---- I always thought , It comes from a wrong development model . If you know the use of data , You should add indexes where you need them from the beginning . Developers often use the database at the application level , For example, writing SQL sentence 、 Stored procedures and so on , They may not even know the index exists , Or think it's relevant after the event DBA Add it on .DBA Often not enough to understand the data flow of the business , Adding indexes requires monitoring a large number of SQL The sentence then finds the problem , The time required for this step must be much longer than the time required for the initial index addition , And may miss a part of the index . Of course, there are not many indexes
边栏推荐
- Unity learning notes: online game pixel Adventure 1 learning process & error correction experience
- Leetcode刷题---977
- Introduction to deep learning linear algebra (pytorch)
- Leetcode skimming ---832
- QT:QSS自定义 QSplitter实例
- Leetcode skimming ---189
- 缓存路由组件
- Ind wks first week
- User recommendation preference model based on attention enhanced knowledge perception
- Leetcode skimming ---44
猜你喜欢

2021-09-22

QT:QSS自定义 QTabWidget 和 QTabBar实例

七、MySQL之数据定义语言(二)

Ut2013 learning notes
![[ultra detailed] implement soft and hard interval SVM based on sklearn](/img/89/b9d03ec26239d88b641f76dc95b3cd.jpg)
[ultra detailed] implement soft and hard interval SVM based on sklearn

Detailed cross validation and grid search -- sklearn implementation

Model selection for neural network introduction (pytorch)

熵值法求权重
正常一英寸25.4厘米,在影像领域是16厘米

Linear regression of introduction to deep learning (pytorch)
随机推荐
2021-09-22
Leetcode刷题---1
Leetcode刷题---35
Unity learning notes: personal learning project "crazy genius Edgar" error correction document
Leetcode skimming ---189
一个30岁的测试员无比挣扎的故事,连躺平都是奢望
QT:QSS自定义 QSlider实例
Leetcode skimming ---704
Introduction to deep learning linear algebra (pytorch)
神经网络入门之模型选择(PyTorch)
Jetson TX2 brush machine
Linear regression of introduction to deep learning (pytorch)
Mysql--索引原理+如何使用
Ut2012 learning notes
Nuget add reference error while installing packages
Unity学习笔记:个人学习项目《疯狂天才埃德加》纠错文档
二分查找法
Windows security center open blank
权重衰退(PyTorch)
[untitled]