数据库设计 - MySQL InnoDB 是不是趋势
阿神
阿神 2017-04-17 12:01:58
0
4
357

mysql

做PHP很多年,刚开始的时候接触到 ecshop dedecms discuz 这些,都是用的myisam,包括 phpmyadmin 创建数据表默认的也是myisam,然后也一直用myisam。

现在发现很多地方都开始用到回滚,包括phpmyadmin 建表默认的也都是 InnoDB。
InnoDB 是一种必须的趋势吗?假如制作一个分类信息网站,存储发布信息的帖子,有必要用InnoDB吗?

阿神
阿神

闭关修行中......

reply all(4)
黄舟

Which storage engine is used in the database depends on the business. Myisam, which reads more and does not need to perform frequent operations on the table, is enough!
I often write, such as orders, that require data related to multiple tables, and transaction processing is used. This can only be done with Innodb!
Only storage engines like Innodb support transactions:

阿神

To boil down why InnoDB is more popular than MyIsam:
1. After a long period of development and optimization, InnoDB's performance has been very good, and most scenarios can have better performance. The main reason is that InnoDB is 行锁 and Myisam is 表锁. Only fully inserted or read tables will be slightly faster with Myisam.
2. Transactions are a very important feature in relational databases. Many practical scenarios require the use of transaction features. InnoDB supports it but MyIsam does not.

There are not many usage scenarios for other storage engines. Memory is occasionally used to make hot tables.

小葫芦
  • InnoDB is a row lock, Myisam is a table lock
  • InnoDB supports transactions
  • InnoDB is constantly being upgraded and optimized
黄舟

To this day, there is no need to think about it. Myisam has no advantage over innodb.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template