当前位置:网站首页>MySQL tuning
MySQL tuning
2022-06-29 13:19:00 【I would like to have a large plate of chicken】
One Basic knowledge of
explain analysis
| id | When there are multiple values Big first | |
| select_type | ||
table | Table used | |
| partitions | Partition | |
| type | Connection type ( At least to ref) | system、const、eq_ref、ref... |
| possible_keys | Possible indexes | Empty means there is no index |
| key | Index of actual selection | Actually using the index |
| key_len | Index length | The smaller the better. ( Related to field type and character encoding ) |
| ref | Which column of the index is referenced | |
| rows | Scanned rows | |
| filtered | ||
| extrea |

Binary tree
Balanced binary trees
B-Tree

B+Tree

B-Tree and B+Tree contrast
- B+Tree The non leaf nodes of the tree only store indexes and do not store data ,B-Tree Tree non leaf nodes store indexes and data .
- B+Tree Leaf node data is indexed . Better for range query data
Two Indexes
Conditions for creating an index
- Fields that are often used as conditions ( Pay attention to the leftmost principle )
- grouping 、 Sort 、 duplicate removal 、 Uniqueness constraint
- Join fields ( Note that the connection field types are consistent, otherwise the implicit conversion index may be invalid ) As an index
Index creation is not recommended
- The recorded data in the table is relatively small
- A lot of duplicate data ( Indexing becomes less efficient )
- Frequently updated fields ( Index maintenance overhead )
Index failure scenario
- Left blur is used
- Use OR Some fields of have no index
- String condition not used ‘ ’ Lead up
- Does not conform to the leftmost principle
- Implicit conversion
- Using the expression Or functions (eg: where age+1=18 . where substring(name,1,3)='zhang'
边栏推荐
- Don't build the wheel again. It is recommended to use Google guava open source tool class library. It is really powerful!
- 【云驻共创】工业智慧“大脑”,老厂焕新的加速秘籍
- bind原理及模拟实现
- CVPR2022 | 长期行动预期的Future Transformer
- Testing -- automated testing: about the unittest framework
- leetcode 522. 最长特殊序列 II
- Lm07 - detailed discussion on cross section strategy of futures
- CVPR2022 | 重新审视池化:你的感受野不是最理想的
- AES-128-CBC-Pkcs7Padding加密PHP实例
- Tree array application (acwing 24224244)
猜你喜欢

倍福控制器连接松下EtherCAT伺服注意事项

Precautions for Beifu controller connecting Panasonic EtherCAT servo

CVPR2022 | PanopticDepth:深度感知全景分割的统一框架

倍福PLC通过CANOpen通信控制伺服

qt 自定义控件 :取值范围
![Equidistant segmentation of surface rivers in ArcGIS [gradient coloring, pollutant diffusion]](/img/05/18fb41f78b9b57175d50dfece65535.png)
Equidistant segmentation of surface rivers in ArcGIS [gradient coloring, pollutant diffusion]

C#通过中序遍历对二叉树进行线索化

C#通過中序遍曆對二叉樹進行線索化

Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file

基于51单片机控制的BUCK开关电源Proteus仿真
随机推荐
netdata邮件告警配置
Memorized Function
leetcode 522. Longest special sequence II
RT-Thread内存管理
Evaluation of powerful and excellent document management software: image management, book management and document management
STK_ Gltf model
ArcGIS中对面状河流进行等距分段【渐变赋色、污染物扩散】
Redis deletion policy and eviction algorithm
C#线索二叉树的定义
Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file
Viewing splitchunks code segmentation from MPX resource construction optimization
If I am in Shenzhen, where can I open an account? In addition, is it safe to open an account online now?
服务器监控netdata面板配置邮件服务
qt json
QT custom control: value range
Adjacency matrix and adjacency table structure of C # realization graph
倍福PLC通过CANOpen通信控制伺服
Uber前安全主管面临欺诈指控 曾隐瞒数据泄露事件
Server monitoring netdata panel configuring mail service
CVPR 2022 | 未知目标检测模块STUD:学习视频中的未知目标