Just an idea for if you want to get real fancy.

Lets say a view has a filter on one or more fields and is sorted on one or more fields, if all of these fields are in the same table a composite index would be in order:
filter 1, filter 2, ..., filter N, sort 1, sort 2, ..., sort N.

(If the fields are in different tables you're screwed and MySQL has to create a temp table anyway)

Comments

mikeytown2’s picture

Title: Better index suggestions with filters and sorts. » Better index suggestions with filters and sorts. Manage Multi Column Indexes