Best way to create indexes for MySQL DB

Really? People actually just dont throw darts at a wall to figure out what tables/fields to create? Perhaps I will rephrase the question and hopefully get a better answer. Sine usually you plan out your database layout prior to creating your database, what is the best way to determine your indexes are properly set with the queries you use? For example to determine that a multi column index would be better than a single index? Do you just manually run explain for all of your queries? Or is there a better way to monitor the queries and change accordingly?

1 Like