当前位置:网站首页>Differences between MySQL storage engine MyISAM and InnoDB

Differences between MySQL storage engine MyISAM and InnoDB

2022-07-07 12:57:00 LC181119

1.MyISAM Storage engine

MyISAM Engine features

  • Unsupported transaction
  • Table level locking
  • Reading and writing block each other , Write cannot read , You can't write when you read
  • Cache index only
  • Foreign key constraints are not supported
  • Clustered index is not supported
  • Read data faster , Less resources
  • I won't support it MVCC( Multi version concurrency control mechanism ) High concurrency
  • Crash recovery is poor
  • MySQL5.5.5 The default database engine before
MyISAM Storage engine application scenarios
  • read-only ( Or write less )
  • Small table ( Long time repair operation is acceptable )
MyISAM Engine files
  • tbl_name.frm Table format definition
  • tbl_name.MYD Data files
  • tbl_name.MYI Index file

2.InnoDB engine

InnoDB Engine features
  • Row-level locks
  • Support transactions , Suitable for dealing with a large number of short-term Affairs
  • Read and write blocking is related to transaction isolation level
  • Cacheable data and indexes
  • Support clustering index
  • Crash resilience is better
  • Support MVCC High concurrency
  • from MySQL5.5 Full text index is supported after
  • from MySQL5.5.5 Start with the default database engine
InnoDB Database files
  • all InnoDB The data and index of the table are placed in the same tablespace

Data files :ibdata1, ibdata2, Store in datadir Defined directory
Table format definition :tb_name.frm, Store in datadir Define the corresponding directory of each database
  • Each form uses a single table space to store the data and index of the table

  The two types of files are placed in a separate directory corresponding to each database

Data files ( Store data and index )tb_name.ibd

Table format definition :tb_name.frm

原网站

版权声明
本文为[LC181119]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130616434124.html