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)
Table of contents Various ways to merge objects (...
Without further ado, these three methods are: ren...
WIN10 64-bit install the latest MySQL8.0.18 downl...
Table of contents 1. Environment Introduction 2. ...
This article records the installation of MySQL 8....
Check the top 100 highest scores in game history ...
1. Nginx status monitoring Nginx provides a built...
Table of contents 1. Basic SELECT statement 1. Qu...
history route History mode refers to the mode of ...
How to implement the paging function of MyBatis i...
Preface In the process of developing a mini progr...
We have many servers that are often interfered wi...
Table of contents Problem Description What is Vue...
1. Introduction to Docker Docker is developed in ...
1. MySQL's own stress testing tool - Mysqlsla...