MySQL supports spatial indexes exactly for circumstances like this:
http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.ht...
11–15 of 15 posts
http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.ht...
Spoon-feeding trivial queries to MySQL is just wrong on so many levels.
I'm reading the first query and maybe it's just early but why isn't that subquery just a join? It seems to be acting that way.
Articles like this make me cry. Use a real database for god's sake (hint: it's free and the logo is an elephant). Spoon-feeding trivial queries to MySQL is just wrong on so many levels.