Does MySQL make use of any indexes when using the ROUND() function?
Consider this query:
SELECT CPRID,ROUND(Dist*1000) AS `Distance`
FROM CPRaw_ID1
GROUP BY ROUND(1000*Dist)
ORDER BY ROUND(Dist*1000)
Will MySQL Still use my Index on the Dist column?
First you can use EXPLAIN to see whether index on Dist will be used in the query. I did an experiment and found out that is not.
Actually, an sugguestion is avoid using functions in where clause. Also, this explained how mysql uses indexes.
In the query you post, I think you can try to create another table and put the result of the query:
into that temporary table and build index on Distance. Then the index will be used to accelerate the query.