Data Engine/Clustered Index

Storage engine comparison
MYISAM

索引与数据分开存储,所有索引级别相同,对应的都是指向真正数据的指针,适合读多写少的场景。不支
持事务,锁的最小粒度为表锁,不太适合高并发读写。不支持崩溃后的安全恢复。

INNODB

一个聚集索引外加多个非聚集索引。支持事务,锁的粒度最小为行锁。支持外键。支持崩溃后的安全恢复。

MEMORY

该存储引擎将数据存储在内存中,适合追求更快的响应速度,适合数据规模小并且不担心数据丢失的场景。

Clustered index and non-clustered index
Clustered index refers to the B+ tree leaf node stores the entire row of data, non-clustered index refers to the B+ tree leaf node storage or an index.
The advantage of the clustered index is that the query speed is fast, but the disadvantage is that when the data changes, the corresponding index also needs to be moved.

Guess you like

Origin blog.csdn.net/qq_41634872/article/details/111148370