RE: Help optimize this simple find

2005-11-07 Thread Gordon Bruce
u could do SELECT lat,lon FROM geocodes WHERE ip BETWEEN 1173020467 AND 1173020467 ; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 10:33 PM To: Brian Dunning Cc: mysql@lists.mysql.com Subject: Re: Help optimize this simple find Bri

Re: Help optimize this simple find

2005-11-04 Thread SGreen
Brian Dunning <[EMAIL PROTECTED]> wrote on 11/04/2005 10:36:00 PM: > This simple find is taking 4 to 7 seconds. Way too long!! (This is a > geotargeting query using the database from IP2location.) > > select lat,lon from geocodes where ipFROM<=1173020467 and > ipTO>=1173020467 > > The database

Help optimize this simple find

2005-11-04 Thread Brian Dunning
This simple find is taking 4 to 7 seconds. Way too long!! (This is a geotargeting query using the database from IP2location.) select lat,lon from geocodes where ipFROM<=1173020467 and ipTO>=1173020467 The database looks like this (how IP2location recommends): CREATE TABLE `geocodes` ( `i