Print Page | Close Window

Our MySQL database diet

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=5528
Printed Date: 14 March 2025 at 4:05am


Topic: Our MySQL database diet
Posted By: Analytical
Subject: Our MySQL database diet
Date Posted: 28 February 2006 at 4:35pm

We found after the Spamfilter service ran for awhile (several months) the database became bloated and we had to run a manual cleanup to make it lose weight. When bloated it was very slow.  If you have trouble with a bloated database -- here was our solution:

We modified the tblmsgs and tblquarantine tables slightly to include a time stamp to better age them.  We set our spamfilter database settings to store rejected emails for three (3) days.

We also wrote a service that checks for any record in the tblmsgs and tblquarantine tables that is four (4) days old or older and purges them.  The service runs hourly and we limit the amount it can purge to 10,000 records.

The service catches any rejected emails in the tables missed by the spamfilter program, and does not requre a relational match.  Now our database is tiny and very fast. 



-------------
His and yours,

Dwight



Print Page | Close Window