Question about using mysql index

I used to read the information on the Internet that mysql like uses an index. If there is a single %, the index will take effect. Then I tried
select * from t_t1 where name like '1_%';

Then I found that
tye=All was used in this test, but possible_keys has an index, but the key= is empty, so I can't figure it out.
Finally , I saw a person on the Internet who said that when mysql uses a full table query, it will default to a full table query

. Sure enough,
select * from t_t1 where name like '1_%';
select * from t_t1 ;

The second sql query time is indeed faster than the first, so when explaining, it always displays All, embarrassing....





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326088165&siteId=291194637