Database Cleanup

Kabitzin on November 21, 2006 · in Site News

Every so often I like to go through the database and clean up. I’m sure most people won’t care, but here’s the list of changes:

  • Fixed Writer Comments: At one point, there was some quirk in Sea Slugs! where the commenter’s email and URL were stripped before being written to the database. This was highly frustrating, but eventually fixed itself in an upgrade. I finally sat down to convert table entries to populate with the correct values. I’m not an SQL whiz, so my methods may have been rather primitive, but it beat the heck out of fixing every comment individually. The comment formatting for authors should now work correctly, and I found some very interesting things…
    • Kungfucius apparently never signs in for commenting! Amazing, I know. However, he is remarkably consistent with his entries, and so it was very easy to fix all his comment tables.
    • I have a lot of comments, but I stay logged in all the time. Because of this, all my incorrect entries were in the same time period. As I had made several half-assed attempts to fix the problem manually, I had to write up 3 different SQL queries to fix all my comments, but it was not too difficult.
    • Now Ender… OK, not only did Ender not sign in to leave comments before (owing to the login-cookie problem in the early days), but he more often then not leaves a fake email address. Not only that, but he uses a variety of fake email addresses from the ever popular a@a.com to a@s.com. To compound the problem even further, he sometimes misspells the fake email addresses, leaving such gems as a@s,com. These comment entries took a very long time to fix…
  • Deleted Short-stat: I used it from time to time to track hits and such, since I’m often too lazy to sign on to Google’s stats or the stats programs available in the CPanel. However, on checking the database, I found that this plugin was insanely bloated, and the tables associated with the plugin took up 50x as much space as the rest of the blog. I dumped the plugin and dropped the tables.
  • Issues with Spam Karma: Again, because of my laziness, sometimes I just flag spam comments as “Spam” directly in the Edit Comments section instead of flagging it with Spam Karma 2. However, apparently this does not factor into Spam Karma’s rankings. So if an old comment is flagged as Spam and not “Manually Spanked”, Spam Karma 2 thinks that the comment is an old and respectable comment. Because of this, I deleted all Spam-flagged comments and turned off Granularity Checks.
  • Re-enabled Trackbacks: I go back and forth on this every few months. We’ll see if the spam TB’s get caught this time; if not, they’ll be turned off again.

This post was written by...

– who has written 1970 posts on Sea Slugs! Anime Blog.

One of the founders of Sea Slugs, I handle most of the blog admin tasks while wearing my I AM BOSS shirt. I like my action series well choreographed, and my romance series extra trashy. I also have a soft spot for puns.

{ 5 comments… read them below or add one }

Hung November 21, 2006 at 3:18 pm

Yeah, I noticed that the short stat thing was huge! It’s gotta make a big performance hit to the DB too, if it writes every time someone loads a page…

Reply

Zyl November 24, 2006 at 5:17 pm

Sorry to ask such a basic question but where are the old spam-flagged comments kept? I’ve been getting problems with the granularity checks too. Plus my average karma for approved comments is a massive -24,000!

Reply

Zyl November 25, 2006 at 6:53 am

Doh! Have dived into myPHPadmin. Doesn’t seem to help the average karma score for approved comments though.

Reply

Kabitzin November 25, 2006 at 7:59 pm

I use Paged Comment Editing to edit stored comments, and you can set it to display all comments that have been marked as spam. Not sure what caused your average approved comment karma to plunge so far into the nega-zone, but probably something was marked incorrectly at one point and as time went on the granulity check went crazy. Personally, I’m not a huge fan of the granulity check, as IP addresses and such get changed all the time by the hardcore spammers.

You should be able to edit the karma scores manually in myPHP admin. Not sure if it’s worth the effort, though.

Reply

Zyl November 26, 2006 at 11:05 am

Thanks, Kabitzin! I’ve disabled the granularity check from now on. Not too bothered by the weird karma score – as long as SK keeps doing its job, I’m happy. :)

Reply

Leave a Comment

Previous post:

Next post: