Anyone Doing GEO Ip Lookups

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adaml2
    Registered User
    • Feb 2001
    • 77

    #1

    Anyone Doing GEO Ip Lookups

    What DB are you using?

    I got a db from ip2location for some cam pages and queries are a little slow to say the least..

    mysql> SELECT ipREGION, ipCITY FROM IPCITYLATLONG WHERE (ipFROM <= 1109302065) AND (ipTO >= 1109302065);
    +---------------+---------+
    | ipREGION | ipCITY |
    +---------------+---------+
    | MASSACHUSETTS | HYANNIS |
    +---------------+---------+
    1 row in set (6.23 sec)

    Aside from being about 70 miles off (good enough for me) I can't add 6 seconds to a page load. I don't really know what kind of times to expect for lookups either, so if you can post up what db you're using and what your times are (roughly) I'd appriciate the help
    icq 76039466
  • montythestrange
    Confirmed User
    • Jun 2005
    • 184

    #2
    check the index on the ipFROM and ipTO columns...
    If you put instant coffee in the microwave, do you go back in time?



    DatingGold Rocks!

    Comment

    • fuzebox
      making it rain
      • Oct 2003
      • 22382

      #3
      The default way ip2location does it is ridiculous, I've got a script that imports the csv into a more manageable db schema, and a PHP include with the functions do deal with it. My queries are fast on entry-level hardware... Feel free to ICQ me

      Comment

      • Adaml2
        Registered User
        • Feb 2001
        • 77

        #4
        fuze pimped me

        much apprciated man
        icq 76039466

        Comment

        • Validus
          Confirmed User
          • Jul 2001
          • 4012

          #5
          The dat file is faster, or at least that is my experience. I got the Geo IP City DB from Maxmind.

          Comment

          • d00t
            Confirmed User
            • Sep 2002
            • 3766

            #6
            ip2location released some new versions just a few days ago too

            Comment

            • tical
              Confirmed User
              • Feb 2002
              • 6504

              #7
              u suck adam
              112.020.756

              Comment

              Working...