Mysql composite index optimization

Mysql composite index optimization

When using both where and order by in mysql statements, establish a combination index and pay attention to the order of the fields

as

SELECT * FROM links WHERE ( status=’1′ ) ORDER BY sort desc;

Combined indexes (status, sort) need to be made for links .


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *