PDA

View Full Version : Improving performance and ipaddress tracking


dwh
02-07-2005, 10:21 PM
If you are a large board and want to improve performance and track IPAddresses better, this hack could work for you, assuming someonedevelops it heheh. It's crazy to keep one IPAddress for every post.Other than the words table the post table is the largest and certainlythe most used. If you could pull ipaddress out of there that alonewould improve things a lot. Although it is a tiny bit useful to knowwhat IP Address was used for each post, it is pretty wasteful for atiny gain. If instead, you logged every UNIQUE ip address per usernamein a seperate table, it would be so much more useful. You couldactually track altip and IP (using one field only, two record if thetwo are different). So if a user has only ever used one ip and has10,000 posts, instead of clogging the post table with 10,000 duplicatepieces of data, it would appear only once in the ipaddress table.
Userid -> IPaddress.

Are you following me here?

Marco van Herwaarden
02-08-2005, 03:33 AM
Not sure if that would improve performance. It would mean you need 1 or 2 more queries, for the gain of only a few bytes in the post table.

dwh
02-08-2005, 03:56 AM
If you have a million posts it's a lot more than a few bytes in the post table. And there would be one extra query only for people whose IP changes all the time. Searching duplicate IP Address would get much quicker. But I suppose when the parser searches for the postid usually it uses the postid index which does not get affected by IPaddress, so maybe you're right and the performance gain for regular day to day forum browsing won't be that great.