From: Ben Clewett Date: January 10 2006 5:13pm Subject: Re: Geogrphic Advise List-Archive: http://lists.mysql.com/mysql/193737 Message-Id: <43C3EB35.4030805@clewett.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jigal, Thanks, I'll give this a go... Ben Jigal van Hemert wrote: > Ben Clewett wrote: > >> But the index does not seem nearly as fast as liner (normal) indexes. >> Hence using a less effective liner index may be better... >> >> After this method I still need select a radius within these data >> points, more effort. > > > This could be an excellent case for using HAVING > > The WHERE can use an index and be very fast selecting the records that > might fall within the circle. The HAVING clause will be executed after > the record set is built and remove the records outside the circle, but > within the square. If the number of records you select is pretty limited > (a few hundred or so) the POW() calculations will not ask too much from > the server, but the full table scan is avoided... > > Regards, Jigal.