Hacker News new | past | comments | ask | show | jobs | submit login
Efficiently computing locations from IP addresses (jcole.us)
5 points by charzom on Dec 1, 2007 | hide | past | favorite | 1 comment



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




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: