Sample Header Ad - 728x90

MySQL profile on query "Creating Sort Index" using 75% of the total time

17 votes
3 answers
89065 views
We are trying to figure how to optimize a query *(taking around 100ms)*, and running profile we see Creating Sort Index using 75% of the total time. First, what exactly effects creating the sort index? Is it disk/io? Second, is there any optimization we can make to the query itself? SELECT r.id, r.name, r.public_uri, rv.version, rv.interpreter, rv.notes, rv.content, r.added, r.added_by, r.modified, r.modified_by, r.public, r.public_by FROM recipe_heads rh, recipes r, recipe_versions rv WHERE rh.recipe = r.id AND rh.recipe_version = rv.id AND r.id = rv.recipe ORDER BY r.added DESC Explain: Screenshot
Asked by Justin (449 rep)
Jan 24, 2015, 12:38 AM
Last activity: Jun 7, 2024, 02:47 PM