Composite index failed several cases

1, breach leftmost conjugated principles:
A, B, C indexing
valid index:
① A
②A, B
③a, B, C
explanation: storing the composite structure of indexing, the second is dependent on the index used in the first basis, and so on.
2, like the fuzzy inquiry, the most exact match left l ike 'name%', otherwise a full table scan.
3, the conditions used in the query OR,>, <,! =, Between and, where age + 1 = 10, where name is null , etc.

Published 93 original articles · won praise 0 · Views 1385

Guess you like

Origin blog.csdn.net/weixin_39406672/article/details/104340201