SQL Optimization for MySQL & MariaDB

Ok, so you have your server configured at optimal performance, a great caching strategy, and your code has been refactored into its best working order. Now...