current position:Home>What is the leftmost and most prefixed principle of MySQL?

What is the leftmost and most prefixed principle of MySQL?

2022-02-04 16:52:37 Alibaba cloud Q & A

MySQL Leftmost of 、 What is the most important principle ?




Take the answer 1:

Leftmost prefix principle , It's the top left priority , When creating a multi-column index , According to business needs ,where The most frequently used column in the clause is at the far left .

When we create a composite index , Such as (k1,k2,k3), It's equivalent to creating (k1)、(k1,k2) and (k1,k2,k3) Three indexes , This is the left most matching principle ..


copyright notice
author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041652352263.html

Random recommended