In case anyone is curious about this. I was having trouble backing up the database. I suspect this is because the data set is getting to big for the amount of RAM we have on that server. Our new box is orders of magnitude more powerful so this isn't a problem. But anyway, I was trying to prune some data and I figured a good place to start would be the unread_comment table. I hadn't looked at it in a while, but I've always had in the back of my mind the problem that pointers to unread comments do not expire. So if someone has an account, but never uses it, the pointers to unread comments will just add up and up and up.

Anyway, much to my surprise, when I looked in that table there were 1.8 million unread comments. It just seems insane to me that everything still worked with that many. Remember everytime you hit the front page it has to read through that entire table once for every page you have listed on your front page! MySQL (the free database we use) is really impressive. That's not even a huge table in the whole scheme of things (although it is on our 512 meg PIII system)

I deleted over 1 million of those rows, although a flipped &_gt; sign was responsible for the trashing being much more thorough than I had meant. (And the database is backed up in case you were worried.)
- jim 11-17-2005 9:10 pm





add a comment to this page:

Your post will be captioned "posted by anonymous,"
or you may enter a guest username below:


Line breaks work. HTML tags will be stripped.