I have this comments table with over 4 million rows:
CREATE TABLE `comments`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`gid` int(11) unsigned NOT NULL DEFAULT '0',
`userid` int(6) unsigned DEFAULT NULL,
`date` int(11) unsigned DEFAULT NULL,
`comment` text NOT NULL,
`status` enum('on','alert') NOT NULL DEFAULT 'on',
PRIMARY KEY (`id`),
KEY `gid_2` (`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
now I'm thinking about extracting the text-field to decrease the 400 MB and increase performance. Like this:
CREATE TABLE commentstext
(
id int(11) unsigned NOT NULL AUTO_INCREMENT,
`comment` text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
but I'm not sure if this will perform better this way. I need to test this cases by using different queries (also). My results so far differ a lot. Between 0.001* - 3.321 sec. I'm not able to check this by querying in phpmyadmin.
Is there a better and easy way or tool to compare queries performance?