Index for MYSQL - ORDER BY influence when creating an index?

3

I have the following query:

SELECT type,name,points FROM clients WHERE type='1' ORDER BY name

I've created an index for the "clients" table just above the "type" field.
Will adding an ORDER BY over an unindexed field affect query response time?

    
asked by anonymous 13.05.2014 / 20:04

1 answer

2

Yes. Please note the reference manual : / p>

  

If you want to have a greater ORDER BY speed, you must first   see if you can make MySQL use indexes ...

But the practical question is how relevant is this time? This answer can only be given with optimization analysis of your queries.

In this manual, you will find all the reference you need to do this analysis: Optimizing selects and Other Queries .

    
13.05.2014 / 22:19