简体   繁体   English

Prestashop的MyISAM或InnoDB数据库?

[英]MyISAM or InnoDB database for Prestashop?

I make my first eshop using Prestashop and I'm not sure if is better use MyISAM or InnoDB. 我使用Prestashop创建了我的第一个eshop,我不确定是否更好地使用MyISAM或InnoDB。 In eshop could be max about 3 000 items. 在eshop中最多可以有大约3 000件物品。 I think that most important for that question is how much items will be in eshop, but if I didn't write some other important information, please ask me. 我认为对于这个问题最重要的是在eshop中会有多少项目,但如果我没有写一些其他重要信息,请问我。

This decision is dependent on read/write ratio. 此决定取决于读/写比率。 MYISAM uses table level level, so if a table is locked only one query can run on it hence MYISAM has serious performance issues. MYISAM使用表级别,因此如果表被锁定,则只能运行一个查询,因此MYISAM存在严重的性能问题。 Also on prior version from 5.6 only MYISAM has support of FULLTEXT search. 同样在5.6的先前版本中,只有MYISAM支持FULLTEXT搜索。 tables of MYISAM are really fast for SELECT queries and it takes less space on disk. MYISAM的表对于SELECT查询来说非常快,并且在磁盘上占用的空间更少。

On the other hand, INNODB supports row-level locking hence concurrent select with insert is possible. 另一方面,INNODB支持行级锁定,因此可以使用insert进行并发选择。 It has support of doing ACID transactions hence each statement is atomic and durable in the event of crash. 它支持执行ACID事务,因此每个语句在发生崩溃时都是原子且持久的。

So my decision is to use INNODB for application like eshop. 所以我决定将INNODB用于eshop这样的应用程序。

I would use InnoDB because it supports transactions and that's likely necessary for an eshop. 我会使用InnoDB,因为它支持交易,这可能是eshop所必需的。 For much more detailed information, check out the answers to this question: MyISAM versus InnoDB 有关更详细的信息,请查看此问题的答案: MyISAM与InnoDB

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM