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 .

Leave a Reply