Database Optimization for Your Own Site: Tuning Slow Query Logs, Indexes, and Table Structures
The right order for WordPress database optimization is to turn on the slow query log first to pinpoint the problem, then use EXPLAIN to analyze the execution plan, and only then decide whether to add an index or change the table structure. Set the slow query threshold to 1 second and review the top...

