大佬浅谈数据库索引(mysql)
2019-04-14 本文已影响0人
阿斌在路上
索引规则:
1、离散性越高越好(计算公式count(distinct(col)):count(col))
2、最左匹配原则
索引:
单列索引
联合索引
覆盖索引(不可使用 *查询,使用列可能使用到覆盖索引和减少数据库IO)



b+ tree 索引


数据结构可视化工具(B+ tree 模拟很经典-百度参考操作)
https://www.cs.usfca.edu/~galles/visualization/