List:General Discussion« Previous MessageNext Message »
From:Jigal van Hemert Date:January 10 2006 3:45pm
Subject:Re: temporary table issue
View as plain text  
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: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
Thread
temporary table issueXiaobo Chen10 Jan
  • Re: temporary table issueJigal van Hemert10 Jan
    • Re: temporary table issueXiaobo Chen10 Jan
    • Re: temporary table issueBen Clewett10 Jan
      • Re: temporary table issueJigal van Hemert10 Jan
        • Re: Geogrphic AdviseBen Clewett10 Jan
  • Re: temporary table issueBill Dodson10 Jan