1
ghia
Slow outbox
  • 2009/4/13 1:04

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I have been wondered why outbox of Private Messages seems so slow in comparaison to inbox. Now I stumbled on this SQL definition and I think to know why.
le="color: #000000"><?php CREATE TABLE priv_msgs ( msg_id mediumint(8) unsigned NOT NULL auto_increment, msg_image varchar(100) default NULL, subject varchar(255) NOT NULL default '', from_userid mediumint(8) unsigned NOT NULL default '0', to_userid mediumint(8) unsigned NOT NULL default '0', msg_time int(10) unsigned NOT NULL default '0', msg_text text, read_msg tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (msg_id), KEY to_userid (to_userid), KEY touseridreadmsg (to_userid,read_msg), KEY msgidfromuserid (msg_id,from_userid) ) TYPE=MyISAM;
I believe the last key should be the other way round:
le="color: #000000"><?php KEY msgidfromuserid (from_userid,msg_id)

2
Catzwolf
Re: Slow outbox
  • 2009/4/13 4:43

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Bug fixed and SVN updated with a correction. Thanks.