We have a table that has very high logical reads, billions in an hour. It is a table that holds start and end ip ranges and their country of origin. Our website looks up incoming ip addresses and then does whatever they do with the country. Been trying to figure out how to get the reads down. I have tried several different indexes and variations of the statement.
Table ddl.
Statement
Table ddl.
Code:
IP_FROM BIGINT NOT NULL , IP_TO BIGINT NOT NULL , COUNTRY_CODE2 FOR COLUMN COUNT00001 VARCHAR(2) CCSID 37 DEFAULT NULL , COUNTRY_NAME FOR COLUMN COUNT00003 VARCHAR(50) CCSID 37 DEFAULT NULL
Code:
[B]SELECT country_code2, country_name FROM iptoc2 WHERE IP_FROM<=21102592 AND IP_TO>=21102592 fetch first row only[/B]
Comment