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 <expr>

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.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to