Binary File or MySql. Which one is efficient and faster for IP2Location GeoIP lookups

Discussion in 'MySQL' started by 12washington, Mar 18, 2007.

  1. #1
    I recently signed up with IP2Location DB5: IP2Location IP- Country-Region-City- Latitude-Longitude

    IP2Location offers three choices:
    1) Apache Module and PHP Module which uses a 33MB .BIN file
    2) A CSV file that can be readily imported into MySQL

    My server will be doing thousands of lookups every second. Should I import the CSV file into the MYSQL DB and cache the entire table of 200MB or should I stick with reading 33MB .BIN file? I have a 15k U320 SCSI RPM drive that will be reading the GeoIP information. I'm not sure which option to go with since I'm not sure if Linux would be storing the entire Binary file into cache when it is being accessed multiple times with fopen/fread. Whereas with MySQL, I can use Memcache and store the entire DB into the memory and hence no disks involved. IP is stored as a decimal number, hence it is stored as an integer of length 10. My DB server is equipped with 2xDual Core Opterons, 8GB ECC, so the server has enough resources to handle the load.

    Which option is the fastest and efficient? Binary file or MySQL DB with Memcache?

    Thanks
    Bill
     
    12washington, Mar 18, 2007 IP
  2. M2D

    M2D Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I found the db import to work better and easier to update... my2c
     
    M2D, Mar 20, 2007 IP