Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

mysql - MyISAM与InnoDB [关闭](MyISAM versus InnoDB [closed])

I'm working on a projects which involves a lot of database writes, I'd say ( 70% inserts and 30% reads ).

(我要说的是一个涉及大量数据库写入的项目( 70%的插入和30%的读取 )。)

This ratio would also include updates which I consider to be one read and one write.

(这个比率还将包括我认为是一次读取和一次写入的更新。)

The reads can be dirty (eg I don't need 100% accurate information at the time of read).

(读取内容可能很脏(例如,读取时我不需要100%准确的信息)。)
The task in question will be doing over 1 million database transactions an hour.

(有问题的任务将是每小时进行超过一百万次数据库事务。)

I've read a bunch of stuff on the web about the differences between MyISAM and InnoDB, and MyISAM seems like the obvious choice to me for the particular database/tables that I'll be using for this task.

(我已经在网上阅读了很多有关MyISAM和InnoDB之间差异的内容,对于我要用于此任务的特定数据库/表,MyISAM似乎是我的明显选择。)

From what I seem to be reading, InnoDB is good if transactions are needed since row level locking is supported.

(从我看来,由于需要支持行级锁定,因此如果需要事务处理,InnoDB很好。)

Does anybody have any experience with this type of load (or higher)?

(是否有人对这种负载(或更高负载)有任何经验?)

Is MyISAM the way to go?

(MyISAM是要走的路吗?)

  ask by user2013 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have briefly discussed this question in a table so you can conclude whether to go with InnoDB or MyISAM .

(我已经在一个表中简要讨论了这个问题,以便您可以得出结论是否要使用InnoDBMyISAM 。)

Here is a small overview of which db storage engine you should use in which situation:

(以下是在哪种情况下应使用的数据库存储引擎的简要概述:)

MyISAM   InnoDB
----------------------------------------------------------------
Required full-text search                        Yes      5.6.4
----------------------------------------------------------------
Require transactions                                      Yes
----------------------------------------------------------------
Frequent select queries                          Yes      
----------------------------------------------------------------
Frequent insert, update, delete                           Yes
----------------------------------------------------------------
Row locking (multi processing on single table)            Yes
----------------------------------------------------------------
Relational base design                                    Yes

To summarize:

(总结一下:)

Frequent reading, almost no writing   => MyISAM
Full-text search in MySQL <= 5.5      => MyISAM

In all other circumstances, InnoDB is usually the best way to go.

(在所有其他情况下, InnoDB通常是最好的方法。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...