当前位置:网站首页>023 MySQL index optimization tips - common cases of index failure

023 MySQL index optimization tips - common cases of index failure

2022-06-11 03:15:00 Focus_ Make a little progress every day

Index optimization summary formula :
Full value matching my favorite , The leftmost prefix should follow ;
Leading brother can't die , The middle brother can't break ;
Less computation on index columns , After the range, it all fails ;
like 100% right , Overlay index without writing * ;
Unequal control and or, Index failure should be used less ;
var Quotation marks cannot be lost ,  sql It's not hard to be advanced ;


1、 Full match : Specify specific values for all columns in the index . In this case , The index works , High execution efficiency

2、 Left most prefix : Also called the leftmost matching principle , The leftmost matching principle is and MySQL Of InnoDB Storage engine B+Tree The data structures of are closely related , You can read these blogs :

The first 1 piece :MySQL Of InnoDB Index references in the storage engine B+Tree

The first 2 piece :MySQL Official website nomenclature / A collection of difficult words (glossary) Medium B+Tree explain

The first 3 piece :MySQL in B+Tree, From the binary tree 、 Balanced binary trees 、B-Tree Speak up

3、 Overlay index : An index contains all the field values to be queried

原网站

版权声明
本文为[Focus_ Make a little progress every day]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110253333711.html