I *think* you're in agreement with what I just said. Using last-accessed
time instead of hit-count makes substantially more sense.


By moving AWL to SQL this can be accomplished. Here is a sample for MySQL:
Add a new field:
ALTER TABLE awl ADD lastupdate timestamp(14) NOT NULL;

If you have a small data set, optionally initialize existing records:
UPDATE awl SET lastupdate = NOW( ) WHERE lastupdate < 1;

NOTE: to prevent compounding the problem by adding all this extra lastupdate
data if you have a large record set it would probably be better to NOT
initialize existing records, letting only new records get time stamped.
Then be patient enough to wait a couple weeks or so before deleting any
records (because the first command below should delete any records that
are not time stamped).

then start daily or weekly maintenance:
DELETE FROM awl WHERE lastupdate <= DATE_SUB(SYSDATE(), INTERVAL 4 MONTH);
DELETE FROM awl WHERE count = 1 AND lastupdate <= DATE_SUB(SYSDATE(), INTERVAL 15 DAY);

I don't see why this method could not also be used for bayes_seen.
I was not aware bayes_seen would grow forever so I am going to implement this
on my own system next week.

ALTER TABLE bayes_seen ADD lastupdate timestamp(14) NOT NULL;

Then wait a few weeks before implementing:

DELETE FROM bayes_seen WHERE lastupdate <= DATE_SUB(SYSDATE(), INTERVAL 2 MONTH);

I am not that familiar with MySQL and Bayes however so I would appreciate it
if someone would point out potential problems with this.

Gary V


Ok, I do see one issue with bayes_seen. When a bayes_seen record is created, the lastupde field is updated but of course the time stamp does not change when the record is simply read. So if you have the same message getting learned every day (for example) cleaning bayes_seen on a regular basis would not be a good idea. You could clean it up something like every four months or so however by using the lastupdate field but you would have to put up with all the added lastupdate data.

Gary V

_________________________________________________________________
Your Hotmail address already works to sign into Windows Live Messenger! Get it now http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview

Reply via email to