On Tue, Aug 12, 2008 at 04:13:57AM -0400, Michael Scheidell wrote:
> >
> > Doesn't that mean that now everytime SA searches for Bayes tokens, it needs
> > to scan the whole database?
>
> No, it will still try to look for bayes_token id=1 and token=? Or for
> expire, atime<?. Optimization sees only one key (token) and/or atime,
> pretends to use where as extra, but, it seriously don't matter.
You're right, need more coffee.. obviously it searches the tokens first and
then only checks for few returned results that id=1.
I can see marginal benefit by dropping the id index:
KEY `idx_token` (`token`)
Data_length: 33095680
Index_length: 11026432
KEY `idx_token` (`id`,`token`)
Data_length: 33095680
Index_length: 14204928
Atleast you save some space. Tested on my personal server with ~600k tokens.
I guess indexing id would only help when have a _lot_ of id's.
-------------------------------------------------------------------------
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/