On 2/12/2010 2:51 PM, Michael Scheidell wrote:
> I looked at our bayes schema and at the schema in
> ../docs/sql/bayes_mysql.sql  and I can't find the redundant index
> mentioned in the SA 3.30 upgrade/changes documents.
>
> did I miss something? or did I remove it years ago anyway?
>

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.

Reply via email to