Using filesort

Using filesort is an Extra value in MySQL EXPLAIN indicating that MySQL must perform an additional sorting operation because an index does not directly provide the requested ORDER BY order. Filesort can use memory or temporary disk storage, and does not necessarily mean that files are written to disk. Using temporary is a separate Extra value indicating that MySQL creates an internal temporary table.

Minimal example

sql
EXPLAIN SELECT * FROM orders ORDER BY total_paise DESC;

Learn this concept

Lesson 6.9 · MySQL query-plan reading