I am working with GEO IP Database(MSSQL) at this point and would like to make some queries a bit faster.
The entire DB is over 100000 records and we look up the country by comparing IP to the Database on every request.
Would it make a difference if we split the MASTER IP Table of DB in 255 tables and compare first octet of incoming IP to a particular Table accordingly, would it make any difference if they were views. Any other recommendations would be welcome.
Unfortunately we are still on 2000 on one of the boxes, but looks like we will be upgrading from 100,000 records to about 2,200,000, this is why I am thinking of moving to the first part of IP logic and splitting into 255 or perhaps re-aranging the data in the way that top countries of choise(most visits) records are sitting on top and USING TOP Keyword to only get the first record and stop searching.
BTW, when using TOP Keyword does the DB Engine stops after it finds the first match or it still goes thru the rest of the rows?