PDA

View Full Version : Modification to IP Searches


Kevlar
12-05-2005, 11:53 PM
Is there a way to possibly modify the IP search to only search the last 30 or 60 days of posts (instead of the past 4 years in my case)? With a little over 5.2 million posts, searching IP addresses normally crashes the server (or brings it pretty close). Normally when I need to do an IP search the past 30 or 60 days is sufficient to track down the person with more than one account.

Thoughts?

Paul M
12-06-2005, 12:00 AM
Why not try adding an index to the ip field in the post table ?

Marco van Herwaarden
12-06-2005, 06:37 AM
Yup, adding an index to the IP will solve most problems:
ALTER TABLE post ADD INDEX ipaddress(ipaddress ASC);

Kevlar
12-06-2005, 12:04 PM
Strange that there is no index on that field already... is there a reason why there wasn't an index on that field to begin with?

Marco van Herwaarden
12-06-2005, 12:12 PM
Seems that Jelsoft is a bit conservative on index usage. They tend only to use primary keys to reduce storage and access time when updating tables.