> From: Benny Pedersen <[EMAIL PROTECTED]>
> Date: Tue, 12 Aug 2008 05:55:55 +0200 (CEST)
> To: Amavis Users <[email protected]>
> Subject: Re: [AMaViS-user] Q about bayes_vars/token and id value
> 
> its not practical to do this tune up since we dont want a spamassassin
> only works with amavisd-new

Why not?
> 
> yes it will, but it will be on cost of flexibilities

Anyone brave enough to try this, here are mysql commands.
Reason I did this was I saw a huge delay in inserting/searching a very large
bayes database.  I was watching transactions with mytop and saw lots of
inserts with id==1.

YMMV, no warrantees, you break it you buy it. If it doesn't work, don't tell
me about it.  Do your normal backup before trying.  Stop amavisd  around
just in case, (I had problems converting existing db, got non-unique keys in
bayes_token if you do this with a running system.  Or, you might need to do
this with a blank bayes (sa-learn --clear)

If you do a 'tarball' backup to experiment you can see how fast an expire
happens, before and after.

START TRANSACTION;
alter table bayes_seen drop primary key;
alter table bayes_seen add primary key (msgid);

alter table bayes_token drop primary key;
alter table bayes_token modify id int(11) not null default '1';
alter table bayes_token add primary key (token);
alter table bayes_token drop key bayes_token_idx1;
alter table bayes_token drop key bayes_token_idx2;
alter table bayes_token add index bayes_token_idx1 (atime);
commit;
-- 
Michael Scheidell, CTO
>|SECNAP Network Security
Winner 2008 Network Products Guide Hot Companies
FreeBSD SpamAssassin Ports maintainer


> 
> --
> Benny Pedersen
> Need more webspace ? http://www.servage.net/?coupon=cust37098
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> AMaViS-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amavis-user
> AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> AMaViS-HowTos:http://www.amavis.org/howto/

_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to