MySQL Forums
Forum List  »  Performance

Re: Question about the Query Cache and server settings
Posted by: Erin ONeill
Date: July 27, 2005 10:28AM

Well, even if a forum is light weight -- shouldn't the schema be designed as optimally as possible? Shouldn't PK be declared as such and not Unique keys? And shouldn't datatypes be correct? I guess I'm asking for too much.

Here's the show create w3t_Posts.

Create Table: CREATE TABLE `w3t_Posts` (
`B_Board` varchar(100) NOT NULL default '',
`B_Number` int(11) unsigned NOT NULL auto_increment,
`B_Parent` int(11) unsigned NOT NULL default '0',
`B_Main` int(11) unsigned NOT NULL default '0',
`B_Posted` int(11) unsigned NOT NULL default '0',
`B_Last_Post` int(11) unsigned NOT NULL default '0',
`B_IP` varchar(60) default NULL,
`B_Subject` text,
`B_Body` text,
`B_File` varchar(100) default NULL,
`B_Kept` char(1) NOT NULL default '',
`B_Status` char(1) NOT NULL default '',
`B_Approved` char(3) NOT NULL default 'yes',
`B_Icon` varchar(30) default NULL,
`B_Reged` char(1) default 'y',
`B_Counter` int(9) unsigned default '0',
`B_Sticky` int(1) unsigned default '0',
`B_Replies` int(4) unsigned default '0',
`B_Poll` varchar(200) default NULL,
`B_Topic` int(1) unsigned NOT NULL default '0',
`B_Convert` varchar(10) default 'markup',
`B_LastEdit` int(9) unsigned default NULL,
`B_LastEditBy` varchar(64) default NULL,
`B_PosterId` int(9) unsigned NOT NULL default '0',
`B_Rating` varchar(5) default '0',
`B_Rates` int(4) default '0',
`B_RealRating` int(1) unsigned default NULL,
`B_FileCounter` int(9) unsigned default '0',
`B_AnonName` varchar(64) default NULL,
`B_ParentUser` int(9) unsigned default NULL,
`B_LastPosterId` int(9) unsigned default NULL,
`B_LastPostNum` int(11) unsigned default NULL,
`B_CalDay` int(2) NOT NULL default '0',
`B_CalMonth` int(2) NOT NULL default '0',
`B_CalYear` int(2) NOT NULL default '0',
`B_AddSig` int(1) NOT NULL default '1',
PRIMARY KEY (`B_Number`),
KEY `w3t_Postsindex1` (`B_Parent`,`B_Board`),
KEY `w3t_Postsindex3` (`B_Main`,`B_Board`),
KEY `w3t_Postsindex8` (`B_Posted`,`B_Board`),
KEY `ID_ndx` (`B_PosterId`),
KEY `cal_ndx` (`B_CalYear`,`B_CalMonth`,`B_CalDay`),
KEY `board_topic_index` (`B_Board`,`B_Topic`,`B_Last_Post`),
KEY `B_Approved` (`B_Approved`)
) TYPE=MyISAM

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Question about the Query Cache and server settings
1619
July 27, 2005 10:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.