how to make levenshtein distance faster for mysql
Functions are slow and it is a complex function. Try optimizing the function. 

Or select down to like .NET and do it there. 

If you get a lot of exact matches you can make that separate. 

SELECT o as distance   
FROM stuff ORDER BY 
where substring(keywords, 1,5) = 'texas')

union 

SELECT levenshtein(substring(keywords, 1,5),'texas') 
from FROM stuff
where substring(keywords, 1,5) &lt;&gt; 'texas')
FROM stuff ORDER BY distance ASC