SPEED TEST RESULTS!!
Ok here are the conditions:
Web Server: Windows Server 2003 + IIS + ColdFusion MX7
Database Server: MS SQL 2005
3 tables -
Table 1 - 4 cols, 1 for each chunk of the ip - all tinyint datatype
Table 2 - 1 col for the ip number converted by the CF function above - bigint datatype
Table 3 - 1 col for the ip as it appears normally - varchar(15) datatype
Each table was filled with 100,018 randomly generated, unique, IPs
I ran 4 tests with 5 runs each. Each run grabbed 50 random ips from the table and then looped over them querying for them and calculating the time it took to complete the loop and return the page to the browser.
Test 1, Table 1, no index set on any column and no PK - average return time 0.613 seconds
Test 2 Table 2, no index set on the column and no PK - average return time 1.12 seconds
Test 3, Table 3, no index set on the column and no PK - average return time 1.27 seconds
Test 4, Table 2, ASC and DESC index set on column and column is set as PK - average return time 0.069 seconds
Obviously the number of rows is pretty low but I got tired of running the scrip that was filling the tables over and over and over again so deal with it. If someone wants to send me a huge list of IP's I'll be happy to run the tests again with a much later database.
Dunno if that is exactly what you were looking for Perkatron so if you want any other data let me know.