Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to optimizing MySQL (cheers for having a high traffic site!) and I'm a little confused by filesort. I stumbled onto this article: with some quick google searching but I can't seem to find any solutions. Does it mean my queries are merely poorly written, do they lack proper indexes (I've spent some time indexing properly, at least what I think is proper) or is there something else at play here?

share|improve this question
up vote 1 down vote accepted

The truth is, filesort is badly named. Anytime a sort can’t be performed from an index, it’s a filesort. (via mysqlperformanceblog)

So, most likely, you've got a query which isn't making use of a table index. See MySQL Create Index

Bonus!: If you're new to tuning your mysql server for high performance take a look at this:

wget # quite the clever domain name ;)
chmod +x

This script will identify a lot of common mistakes, and make performance suggestions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.