FYI: There is no magic bullet
Last night I did an amazing thing. A mysql query was taking around 20-30 minutes to execute. It was a pretty heavy query with the purpose of creating a dump of data in excel format. With 3-4 JOINs, 2-3 WHERE clauses. And it was already optimized, and it seemed like there is nothing we can do. But then an idea hit me. And the query is now happily dumping data in 3-4 seconds. ...