查看table的存储引擎
show create table producttype;
CREATE TABLE `producttype` (
`id` int(11) NOT NULL auto_increment,
PRIMARY KEY (`typeId`)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8
修改表的存储引擎
alter table tablename engine=innodb
修改默认存储引擎 配置文件my.ini
default-storage-engine=INNODB
《High Performance MySQL》 中的各存储引擎的特性表
Attribute |
MyISAM |
Heap |
BDB |
InnoDB |
---|---|---|---|---|
Transactions |
No |
No |
Yes |
Yes |
Lock granularity |
Table |
Table |
Page (8 KB) |
Row |
Storage |
Split files |
In-memory |
Single file per table |
Tablespace(s) |
Isolation levels |
None |
None |
Read committed |
All |
Portable format |
Yes |
N/A |
No |
Yes |
Referential integrity |
No |
No |
No |
Yes |
Primary key with data |
No |
No |
Yes |
Yes |
MySQL caches data records |
No |
Yes |
Yes |
Yes |
Availability |
All versions |
All versions |
MySQL-Max |
All Versions |