After reading the OpenGIS for SQL specifications, it's apparent that there is a layer of Spatial Representation control that is still missing from MySQL.
This makes the Distance functions as implemented not very useful for what most people use GIS for: latitude and longitude on the earth's surface.
In the meantime, I have a patch that adds 2 functions: earth_distance_miles() and earth_distance_km() to the wl1326 branch.
To find the nearest X rows, on a database with 600k rows with a POINT column:
earth_distance_*() takes 3.04 seconds.
distance() takes 2.78 seconds.
If anyone would like a copy of the patch you can find it here:
http://www.twintechs.com/blog/?p=15
UPDATE: link fixed, was 404. :(
Note, this assumes you are storing your POINT as POINT(latitude longitude). Which I understand is not how people expect this to be at some point in the future.
Edited 3 time(s). Last edit at 05/22/2008 05:42AM by Jesse Dailey.