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` (
  `ipFROM` int(10) unsigned zerofill NOT NULL default '0000000000',
  `ipTO` int(10) unsigned zerofill NOT NULL default '0000000000',
  `lat` double default NULL,
  `lon` double default NULL,
  PRIMARY KEY  (`ipFROM`,`ipTO`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

And there are 1.7 million records. Any suggestions?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to