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.
CREATE TABLE priv_msgs (
  
msg_id mediumint(8unsigned NOT NULL auto_increment,
  
msg_image varchar(100) default NULL,
  
subject varchar(255NOT NULL default '',
  
from_userid mediumint(8unsigned NOT NULL default '0',
  
to_userid mediumint(8unsigned NOT NULL default '0',
  
msg_time int(10unsigned NOT NULL default '0',
  
msg_text text,
  
read_msg tinyint(1unsigned 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:
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.

Login

Who's Online

147 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits