1. When creating a joint index, pay attention to the columns with large dispersion.
able to pass
select count(distinct(A)),count(distinct(B)) from tb;
See which column has the largest dispersion.
2. Index column check tool - check for duplicate or redundant index columns in mysql index
pt-duplicate-key-checker: can detect redundant index columns in the database and give suggestions for deletion;
Execution: Exit mysql, enter the terminal:
pt-duplicate-key-checker -uroot -p1234 -h 127.0.0.1