On Sat, Feb 13, 2010 at 10:33:08AM -0600, David Morton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Matt Kettler wrote:
> 
> > A quick diff of the 3.2 and 3.3 versions of these files shows this table
> > was changed:
> > 
> > 
> > CREATE TABLE bayes_token (
> >   id int(11) NOT NULL default '0',
> >   token char(5) NOT NULL default '',
> >   spam_count int(11) NOT NULL default '0',
> >   ham_count int(11) NOT NULL default '0',
> >   atime int(11) NOT NULL default '0',
> >   PRIMARY KEY  (id, token),
> >   INDEX bayes_token_idx1 (token),                    <- deleted
> >   INDEX bayes_token_idx2 (id, atime)                <- renamed idx1
> > ) TYPE=MyISAM;
> > 
> > 
> > 
> > So token was both a primary key, and an index, which is redundant.
> 
> How is that redundant?  If you search for only a token, it would not be
> indexed, and would perform very poorly.

As you didn't bother to check SpamAssassin sources, let me clarify it for
you. All the SA queries use "id=? AND token=?". If something is changed,
it's usually for a reason. But thanks for the effort anyway.

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5659

Reply via email to