65
ultrono
7y

At the moment I'm trying to optimize a slow old MySQL query from a project I made several years ago. The execution time is in excess of 55 seconds. Not good :(

After about an hour of experimenting I finally set a good index and reduced the time to < 3 seconds.

Chuffed :)

Comments
  • 6
    My god, what was I thinking all those years ago. Just set another appropriate index on some reporting related tables and reduced the execution time from 2 minutes to 10 seconds.

    Remember kids, always set indexes where appropriate :)
  • 1
    @ultrono even without indexing how om earth the query took 2 minutes or even 55 seconds ? Maybe you shoukd remodel your database or think about database designing. Have you considered using elastisearch or solr?
  • 1
    @anekix All good points but unfortunately it's a legacy project that the client isn't willing to spend a huge amount of money. In a perfect world I'd do all the things you suggest :)
Add Comment