1. Joint index descriptionCreate a joint index of three fields The joint index (a,b,c) is equivalent to creating the index: (a), (a,b), (a,b,c) 2. Can ac use indexes?
1. Create an abc joint index (province, city, district) ac index query SELECT * FROM user_address WHERE province = 'Guangdong' AND district = 'Nanxiong City'
2. Create a joint index for the two fields ac directly SELECT * FROM user_address WHERE province = 'Guangdong' AND district = 'Nanxiong City'
3.ab index query
in conclusion abc joint index, c in ac cannot hit the joint index of these three fields, but a can hit it, so the possible_keys column will show that the joint index is used. 3. Thinkingabc index, will acb follow the index?
4. The cause of the leftmost matching principle
This is the end of this article about the leftmost matching principle of MySQL database index. For more relevant MySQL index leftmost matching content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of vuex persistence in practical application of vue
>>: A detailed introduction to Linux system operation levels
<br />This is not only an era of information...
Table of contents Problem description: Solution 1...
In the actual projects I participated in, I found...
Preface vsftp is an easy-to-use and secure ftp se...
The attributes of the <TD> tag are used to ...
In order to facilitate the storage and access of ...
Nginx supports three ways to configure virtual ho...
MySql always pops up a MySQLInstallerConsole.exe ...
Table of contents The principle of Vue asynchrono...
Table of contents First method App.vue Home.vue H...
After a long period of transplantation and inform...
Preface: It’s the end of the year, isn’t it time ...
origin Recently, I am working on requirement A, i...
Method 1: Command line modification We only need ...
· 【Scene description】 After HTTP1.1, the HTTP pro...