Adding indexes can improve query efficiency. Adding an index means adding an index file, which stores the address of the data, similar to the directory of our document. During the search process, you do not need to search from the contents of the book, but can directly search according to the page number corresponding to the directory. Indexes are searched based on addresses. Use explain to view the SQL execution planExecution plan type Indicates the way MySQL finds the required row in the table, also known as the "access type". Common types are as follows: ALL, index, range, ref, eq_ref, const, system, NULL 1. Use or to query multiple columns, type=all2. Use fuzzy query, type=all3. Operations on indexed fields4. If the column type is a string, it needs to be quoted. The name field is a string typeWithout quotes type=all There are quotation marks tye=ref First of all, MySQL has a type conversion rule that converts "characters to numbers". The above SQL contains operations: 5. Reverse query distinction (not, not in, not like, <>, !=, !>, !<) Use index effects Other situations 1. The associated fields in the joint index do not use the same character set; This concludes this article on several situations in which adding an index to MySQL does not work. For more information about adding an index to MySQL not working, please search for previous articles on 123WORDPRESS.COM or continue browsing the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of Vue life cycle functions
>>: Better looking CSS custom styles (title h1 h2 h3)
Vim is a text editor that we use very often in Li...
Preface Let me share with you how to make a searc...
Kernel: [root@opop ~]# cat /etc/centos-release Ce...
Preface When testing, in order to test the projec...
Table of contents Start by clicking the input box...
Table of contents What is an agent Basic knowledg...
Three types of message boxes can be created in Ja...
Often when building a SPA, you will need to prote...
Table of contents 1. Introduction to pid-file 2.S...
1. Install mysql: udo apt-get install mysql-serve...
Table of contents introduce 1. Pica 2. Lena.js 3....
name character name character information news te...
1. Download MySQL Click on the official website d...
XQuery is a language for extracting data from XML...
Preface: I reinstalled win10 and organized the fi...