高性能计数表的最佳引擎

时间:2012-04-26 11:11:47

标签: mysql database-optimization database-engine

我有一个counts表,其中包含类似于(大约14个计数列)的列:

user_id
friends_count
photo_count
video_count
blogs_count

每当用户添加照片或朋友时,此表都会更新。

我将使用InnoDB引擎,因为最好有行锁定,但同时此表上还有很多读取数据。对于每个用户,当他们看到其他用户的配置文件或甚至用户侧菜单包含所有这些计数。

哪种引擎最适合大多数写入和大多数读取这样?

2 个答案:

答案 0 :(得分:2)

我查看了不同的文章,特别是这三个链接

http://www.oracle.com/partners/en/knowledge-zone/mysql-5-5-innodb-myisam-522945.pdf

Should I use MyISAM or InnoDB Tables for my MySQL Database?

http://www.quora.com/Which-MySQL-Storage-engines-are-used-by-Facebook

并得出结论,最好继续使用InnoDB。

对此的任何评论也表示赞赏

谢谢和问候

Kiran

答案 1 :(得分:0)

General purpose MySql/MariaDB Engines

  1. XtraDB is the best choice in the majority of cases. It is a performance-enhanced fork of InnoDB and is MariaDB's default engine until MariaDB 10.1.

  2. InnoDB is a good general transaction storage engine. It is the default MySQL storage engine, and default MariaDB 10.2 storage engine, but in earlier releases XtraDB is a performance enhanced fork of InnoDB, and is usually preferred.

  3. Aria, MariaDB's more modern improvement on MyISAM, has a small footprint and allows for easy copying between systems.

  4. MyISAM has a small footprint and allows for easy copying between systems. MyISAM is MySQL's oldest storage engine. There is usually little reason to use it except for legacy purposes. Aria is MariaDB's more modern improvement.

Source of info: MariaDB Engines