Home > Database > Mysql Tutorial > What is mysql covering index

What is mysql covering index

王林
Release: 2023-05-26 11:19:19
forward
1494 people have browsed it

1. The columns required in the query statement are in the index, so that the query results can be found in the data structure of the index.

2. Because covering indexes can reduce the number of tree searches and significantly improve query performance, using covering indexes is a common performance optimization method.

Example

+----+-------------+------------+------+-----------------------+--------------+---------+-------+------+-------------+
| id | select_type | table      | type | possible_keys         | key          | key_len | ref   | rows | Extra       |
+----+-------------+------------+------+-----------------------+--------------+---------+-------+------+-------------+
|  1 | SIMPLE      | user_group | ref  | group_id,group_id_uid | group_id_uid | 4       | const | 5378 | Using index |
+----+-------------+------------+------+-----------------------+--------------+---------+-------+------+-------------+
Copy after login

The above is the detailed content of What is mysql covering index. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template