【知识库】--mysql engines MyISAM vs InnoDB(146)

来源:互联网 发布:麦吉尔大学知乎 编辑:程序博客网 时间:2024/05/18 02:58

MyISAM vs InnoDB
MyISAM:不支持事务,不支持行级锁;
支持 fullindex indexing ;
最多 64 keys per table;
不支持外键;
支持table level locking;
three files: formate file (store table structure), data file store rows,index file store indexes;【table.frm,table.MYD,table.MYI】
支持:读写锁模式;readWriteLock model
InnoDB
支持事务;COMMIT ROOLBACK SAVEPOINT
支持行级锁;
Data and indexes stored in one “tablesapce” file;
undo space: insert undo space, update undo space;
Only file in database directity is .frm;
tablesapce limited to 64 terabytes(TB);
Use variable length strings whenever appropriate;
Many system variables for tuning performance;

Insert buffer (change buffer)
buffers changes to secondary indexes and avoids substantial random IO that would be required to read-in-secondary index pages from disk.

小技巧
1 mysql 展示存储引擎 show engines \G;
2 mysql 换行 system clear;
3 展示表状态: show table status like ‘City’ \G

0 0
原创粉丝点击