MySQL has a pluggable storage engine architecture which means that you
can use multiple storage engines within your databases. What you need
to do is investigate the different features of the engines and devide
which one best fits your system i.e. level of locking required,
InnoDB=row level MyISAM = table level.
funnily enough, from face value i would of expected your tables to be
the other way around if anything, COMMENT to be InnoDB and country to be
MyISAM. MyISAM is probably the easier to maintain and understand at first.
> I'm trying to find a weird performance problem in a MySQL database. I
> use MySQL v5.0 but the db was migrated forward from a v4.1(?) system.
> Looking at the schema in a recent backup, I was surprised to find
> different engines used for different tables:
> CREATE TABLE `comment` (
> `id` int(10) unsigned NOT NULL default '0',
> `entered` date default NULL,
> `author` varchar(20) default NULL,
> `about` mediumint(8) unsigned NOT NULL default '0',
> `comment` text,
> KEY `bySubject` (`about`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
> CREATE TABLE `country` (
> `abbrev` char(2) NOT NULL default '',
> `name` varchar(45) default NULL,
> PRIMARY KEY (`abbrev`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> Is this OK? If not, what's the solution? Backup, change all the
> enginges to the same one, and restore?