Page 1 of 1

How to do database cleanup?

Posted: Fri Mar 02, 2007 12:40 pm
by Zugschlus
Hi,

my spambloglog and visitors database are well beyond the 200 MB border by now.

What is the recommended way to expire old log entries?

Re: How to do database cleanup?

Posted: Fri Mar 02, 2007 1:09 pm
by garvinhicking
Hi!

Simply TRUNCATE the spambloglog table. About visitors, I don't use that one - truncating it will of course remove the old visitor data.

Best regards,
Garvin

Re: How to do database cleanup?

Posted: Sat Mar 03, 2007 4:21 pm
by Zugschlus
garvinhicking wrote:Simply TRUNCATE the spambloglog table. About visitors, I don't use that one - truncating it will of course remove the old visitor data.
Truncating seems to be a bit radical. Will s9y like it when I use the timestamp fields to delete anything older than three months?

Greetings
Marc

Posted: Sat Mar 03, 2007 7:26 pm
by TKS
I clean mine this way...

I disabled statistics because it slowed my blog down to 20-30 second display times. I dropped the tables' content associated with statistics via phpmyadmin.

I signed up for google analytics and feedburner, added the code for analytics to my index page and feedflare via plugin to my blog entries...that way my stats are still tracked for me. Another good service is mapstats...I had that at one time but not anymore.

I then disabled spam being stored in the database and used phpadmin to clean the entire table for spam. I use flatfile now and I clean that file out with a cron job. The job ftp's in, downloads the spam file, then uploads a blank file over the top.

It works much better, I'm more informed, and I my blog displays in less than 8 seconds now.

Posted: Sat Mar 03, 2007 10:03 pm
by Zugschlus
TKS wrote:I disabled statistics because it slowed my blog down to 20-30 second display times.
This is most probably due to missing indexes. Activate MySQL's slow query log and liberally add indexes that might be helpful in optimizing the queries logged there.

Greetings
Marc

Re: How to do database cleanup?

Posted: Sat Mar 03, 2007 11:39 pm
by garvinhicking
Hi Marc!

s9y only uses spamblocklog for writing. It nevers reads data from there, so you can truncate or remove anything you seem fit. s9y won't care. :)

Regards,
Garvin

Posted: Tue Mar 06, 2007 8:04 am
by Fabien
Hi,

Can I do the same thing with the referrers table?

Is there a clean way to disable writng in the referrers table? Or to have it purged regularly?

Thanks, Fabien

Posted: Tue Mar 06, 2007 10:43 am
by garvinhicking
Hi!

Yes, you can also delete entries from that table.

In the global s9y configuration you can disable referrer tracking.

Regards,
Garvin