On Tue, Aug 12, 2008 at 03:50:24AM -0400, Michael Scheidell wrote: > > 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. > > ... > > 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;
Doesn't that mean that now everytime SA searches for Bayes tokens, it needs to scan the whole database? Because all the clauses are "SELECT * FROM bayes_token WHERE id=? AND token=?". Now ofcourse it can't know what id's the table contains? Unless MySQL is wise enough to cache that "everything is 1". You are free however to remove the "duplicate" bayes_token_idx1 key.. https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5659 ------------------------------------------------------------------------- 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/
