

Efficiently computing locations from IP addresses - charzom
http://jcole.us/blog/archives/2007/11/24/on-efficiently-geo-referencing-ips-with-maxmind-geoip-and-mysql-gis/

======
tlrobinson
Interesting.

I find it amusing that he went to all the trouble (well, not that much
trouble) of using MySQL's spatial database features when the following simple
query performed even better:

    
    
        SELECT country_code
        FROM ip_country
        WHERE ip_to >= INET_ATON('%s')
        ORDER BY ip_to ASC
        LIMIT 1
    

