2020.4.2 On the 14th day of registration on Thursday, I am going to work and need a new job.

Cluster promotion index B + tree

The myisam storage engine is used for single-table query and cannot be related to tables.

Innodb is generally used.

What is back to watch. The joint index or common index requires a B + tree.

Traverse the B + tree twice,

Back to the table, first query the primary key.

Cover the index. The columns of the query field can be directly obtained by using the covering index, and they will not be returned to the table. If not, return to the watch.

Index classification: primary key index, unique index, full text index, combined index.

Full Text Index-Alternative Technology-ES / SOLAR

The left-most match in the combined index.

select * from table where name = ? and age = ?
alter table table add index(name,age)

mysql component optimizer

The index is pushed down. Make the actual query. According to the name, data will be pulled from the storage engine to the server layer, and then data filtering will be done at the server layer.

Name and age search the returned data uniformly.

Only the primary key index is placed with the data.

Published 17 original articles · praised 0 · visits 494

Guess you like

Origin blog.csdn.net/songweixun/article/details/105279287