I have a need to locate (x,y) coordinates from mysql where they are
close to another coordinate. For instance, all pizza bars near my car.
Example: Searching for points closer than z to (i,j) using Pythagoras:
SET i = 10;
SET j = 10;
SET z = 30;
SELECT x, y
WHERE POW(x - @i, 2) + POW(y - @i, 2) < POW(@z, 2)
Big problem! Must searches every row. Linear indexing not able to help
I have been reading the Geographic Spacial extensions to MySQL. Which
enable me to store the coordinates in a far more useful form. But do
not seem to offer me the type of index I need.
This must be a common problem, is there any person who can help me?
Thanks in advance,