I have a InnoDB MySql Geo ID table that has ~ 1 million rows. The table structure is this:
CREATE TABLE `geoid` (
`start_ip` int(11) NOT NULL,
`end_ip`
Try adding an index on end_ip
. This should make the query about twice as fast in some cases.
For much better perfomance you need to use a SPATIAL index, as explained in this article.
Try to create index on all fields included in query. on this particular case create one index on two fields (start_ip and end_ip)