<p>I'm working on a projects which involves a lot of database writes, I'd say (<em>70% inserts and 30% reads</em>).  This ratio would also include updates which I consider to be one read and one write.  The reads can be dirty (e.g. I don't need 100% accurate information at the time of read).<br>
The task in question will be doing over 1 million database transactions an hour.  </p>

<p>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.  From what I seem to be reading, InnoDB is good if transactions are needed since row level locking is supported.</p>

<p>Does anybody have any experience with this type of load (or higher)?  Is MyISAM the way to go?</p>

[{'answer_id': 22733, 'author': 'rix0rrr', 'author_id': 2474, 'author_profile': 'https://Stackoverflow.com/users/2474', 'pm_score': 8, 'selected': False, 'text': '<p>I\'m not a database expert, and I do not speak from experience. However:</p>\n\n<p><a href="http://dev.mysql.com/doc/refman/5.1/en/internal-locking.html" rel="noreferrer">MyISAM tables use table-level locking</a>. Based on your traffic estimates, you have close to 200 writes per second. With MyISAM, <em>only one of these could be in progress at any time</em>. You have to make sure that your hardware can keep up with these transaction to avoid being overrun, i.e., a single query can take no more than 5ms.</p>\n\n<p>That suggests to me you would need a storage engine which supports row-level locking, i.e., InnoDB.</p>\n\n<p>On the other hand, it should be fairly trivial to write a few simple scripts to simulate the load with each storage engine, then compare the results.</p>\n'}, {'answer_id': 22892, 'author': 'Gary Richardson', 'author_id': 2506, 'author_profile': 'https://Stackoverflow.com/users/2506', 'pm_score': 2, 'selected': False, 'text': "<p>Every application has it's own performance profile for using a database, and chances are it will change over time.</p>\n\n<p>The best thing you can do is to test your options. Switching between MyISAM and InnoDB is trivial, so load some test data and fire jmeter against your site and see what happens.</p>\n"}, {'answer_id': 77374, 'author': 'MarkR', 'author_id': 13724, 'author_profile': 'https://Stackoverflow.com/users/13724', 'pm_score': 5, 'selected': False, 'text': "<p>If you use MyISAM, you won't be doing <strong>any</strong> transactions per hour, unless you consider each DML statement to be a transaction (which in any case, won't be durable or atomic in the event of a crash).</p>\n\n<p>Therefore I think you have to use InnoDB.</p>\n\n<p>300 transactions per second sounds like quite a lot. If you absolutely need these transactions to be durable across power failure make sure your I/O subsystem can handle this many writes per second easily. You will need at least a RAID controller with battery backed cache.</p>\n\n<p>If you can take a small durability hit, you could use InnoDB with innodb_flush_log_at_trx_commit set to 0 or 2 (see docs for details), you can improve performance.</p>\n\n<p>There are a number of patches which can increase concurrency from Google and others - these may be of interest if you still can't get enough performance without them.</p>\n"}, {'answer_id': 77625, 'author': 'alanc10n', 'author_id': 14059, 'author_profile': 'https://Stackoverflow.com/users/14059', 'pm_score': 7, 'selected': False, 'text': '<p>I\'ve worked on a high-volume system using MySQL and I\'ve tried both MyISAM and InnoDB.</p>\n\n<p>I found that the table-level locking in MyISAM caused serious performance problems for our workload which sounds similar to yours. Unfortunately I also found that performance under InnoDB was also worse than I\'d hoped.</p>\n\n<p>In the end I resolved the contention issue by fragmenting the data such that inserts went into a "hot" table and selects never queried the hot table.</p>\n\n<p>This also allowed deletes (the data was time-sensitive and we only retained X days worth) to occur on "stale" tables that again weren\'t touched by select queries. InnoDB seems to have poor performance on bulk deletes so if you\'re planning on purging data you might want to structure it in such a way that the old data is in a stale table which can simply be dropped instead of running deletes on it.</p>\n\n<p>Of course I have no idea what your application is but hopefully this gives you some insight into some of the issues with MyISAM and InnoDB.</p>\n'}, {'answer_id': 414934, 'author': 'staticsan', 'author_id': 28832, 'author_profile': 'https://Stackoverflow.com/users/28832', 'pm_score': 6, 'selected': False, 'text': '<p>For a load with more writes and reads, you will benefit from InnoDB. Because InnoDB provides row-locking rather than table-locking, your <code>SELECT</code>s can be concurrent, not just with each other but also with many <code>INSERT</code>s. However, unless you are intending to use SQL transactions, set the InnoDB commit flush to 2 (<a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit" rel="noreferrer">innodb_flush_log_at_trx_commit</a>). This gives you back a lot of raw performance that you would otherwise lose when moving tables from MyISAM to InnoDB.</p>\n\n<p>Also, consider adding replication. This gives you some read scaling and since you stated your reads don\'t have to be up-to-date, you can let the replication fall behind a little. Just be sure that it can catch up under anything but the heaviest traffic or it will always be behind and will never catch up. If you go this way, however, I <em>strongly</em> recommend you isolate reading from the slaves and replication lag management to your database handler. It is so much simpler if the application code does not know about this.</p>\n\n<p>Finally, be aware of different table loads. You will not have the same read/write ratio on all tables. Some smaller tables with near 100% reads could afford to stay MyISAM. Likewise, if you have some tables that are near 100% write, you may benefit from <code>INSERT DELAYED</code>, but that is only supported in MyISAM (the <code>DELAYED</code> clause is ignored for an InnoDB table). </p>\n\n<p>But benchmark to be sure.</p>\n'}, {'answer_id': 415012, 'author': 'yogman', 'author_id': 24349, 'author_profile': 'https://Stackoverflow.com/users/24349', 'pm_score': 3, 'selected': False, 'text': "<p>In my experience, MyISAM was a better choice as long as you don't do DELETEs, UPDATEs, a whole lot of single INSERT, transactions, and full-text indexing. BTW, CHECK TABLE is horrible. As the table gets older in terms of the number of rows, you don't know when it will end.</p>\n"}, {'answer_id': 1653985, 'author': 'pfote', 'author_id': 200096, 'author_profile': 'https://Stackoverflow.com/users/200096', 'pm_score': 2, 'selected': False, 'text': "<p>myisam is a NOGO for that type of workload (high concurrency writes), i dont have that much experience with innodb (tested it 3 times and found in each case that the performance sucked, but it's been a while since the last test)\nif you're not forced to run mysql, consider giving postgres a try as it handles concurrent writes MUCH better</p>\n"}, {'answer_id': 3180781, 'author': 'neal aise', 'author_id': 369798, 'author_profile': 'https://Stackoverflow.com/users/369798', 'pm_score': 1, 'selected': False, 'text': '<p>For that ratio of read/writes I would guess InnoDB will perform better. \nSince you are fine with dirty reads, you might (if you afford) replicate to a slave and let all your reads go to the slave. Also, consider inserting in bulk, rather than one record at a time. </p>\n'}, {'answer_id': 3535256, 'author': 'jsherk', 'author_id': 426804, 'author_profile': 'https://Stackoverflow.com/users/426804', 'pm_score': 4, 'selected': False, 'text': '<p>I think this is an excellent article on explaining the differences and when you should use one over the other:\n<a href="http://tag1consulting.com/MySQL_Engines_MyISAM_vs_InnoDB" rel="noreferrer">http://tag1consulting.com/MySQL_Engines_MyISAM_vs_InnoDB</a></p>\n'}, {'answer_id': 3707592, 'author': 'Ricardo', 'author_id': 288019, 'author_profile': 'https://Stackoverflow.com/users/288019', 'pm_score': 3, 'selected': False, 'text': "<p>I've figure out that even though Myisam has locking contention, it's still faster than InnoDb in most scenarios because of the rapid lock acquisition scheme it uses. I've tried several times Innodb and always fall back to MyIsam for one reason or the other. Also InnoDB can be very CPU intensive in huge write loads.</p>\n"}, {'answer_id': 6796566, 'author': 'developer99', 'author_id': 858727, 'author_profile': 'https://Stackoverflow.com/users/858727', 'pm_score': 9, 'selected': False, 'text': '<p>I have briefly <a href="http://developer99.blogspot.com/2011/07/mysql-innodb-vs-myisam.html" rel="noreferrer">discussed</a> this question in a table so you can conclude whether to go with <strong>InnoDB</strong> or <strong>MyISAM</strong>.</p>\n\n<p>Here is a small overview of which db storage engine you should use in which situation:</p>\n\n<pre>\n                                                 MyISAM   InnoDB\n----------------------------------------------------------------\nRequired full-text search                        Yes      5.6.4\n----------------------------------------------------------------\nRequire transactions                                      Yes\n----------------------------------------------------------------\nFrequent select queries                          Yes      \n----------------------------------------------------------------\nFrequent insert, update, delete                           Yes\n----------------------------------------------------------------\nRow locking (multi processing on single table)            Yes\n----------------------------------------------------------------\nRelational base design                                    Yes\n</pre>\n\n<p><strong>Summary</strong></p>\n\n<ul>\n<li>In almost all circumstances, <strong>InnoDB</strong> is the best way to go</li>\n<li>But, frequent reading, almost no writing, use <strong>MyISAM</strong></li>\n<li>Full-text search in MySQL &lt;= 5.5, use <strong>MyISAM</strong></li>\n</ul>\n'}, {'answer_id': 8250970, 'author': 'user965748', 'author_id': 965748, 'author_profile': 'https://Stackoverflow.com/users/965748', 'pm_score': 2, 'selected': False, 'text': '<p>I tried to run insertion of random data into MyISAM and InnoDB tables. The result was quite shocking. MyISAM needed a few seconds less for inserting 1 million rows than InnoDB for just 10 thousand!</p>\n'}, {'answer_id': 9996879, 'author': 'Refiner', 'author_id': 1192825, 'author_profile': 'https://Stackoverflow.com/users/1192825', 'pm_score': 4, 'selected': False, 'text': '<p>Also check out some drop-in replacements for MySQL itself:</p>\n\n<p><strong>MariaDB</strong></p>\n\n<p><a href="http://mariadb.org/" rel="noreferrer">http://mariadb.org/</a></p>\n\n<p>MariaDB is a database server that offers drop-in replacement functionality for MySQL. MariaDB is built by some of the original authors of MySQL, with assistance from the broader community of Free and open source software developers. In addition to the core functionality of MySQL, MariaDB offers a rich set of feature enhancements including alternate storage engines, server optimizations, and patches.</p>\n\n<p><strong>Percona Server</strong></p>\n\n<p><a href="https://launchpad.net/percona-server" rel="noreferrer">https://launchpad.net/percona-server</a></p>\n\n<p>An enhanced drop-in replacement for MySQL, with better performance, improved diagnostics, and added features.</p>\n'}, {'answer_id': 12130057, 'author': 'Patrick Savalle', 'author_id': 1199612, 'author_profile': 'https://Stackoverflow.com/users/1199612', 'pm_score': 5, 'selected': False, 'text': "<p>Slightly off-topic, but for documentation purposes and completeness, I would like to add the following.</p>\n\n<p>In general using InnoDB will result in a much LESS complex application, probably also more bug-free. Because you can put all referential integrity (Foreign Key-constraints) into the datamodel, you don't need anywhere near as much application code as you will need with MyISAM.</p>\n\n<p>Every time you insert, delete or replace a record, you will HAVE to check and maintain the relationships. E.g. if you delete a parent, all children should be deleted too. For instance, even in a simple blogging system, if you delete a blogposting record, you will have to delete the comment records, the likes, etc. In InnoDB this is done automatically by the database engine (if you specified the contraints in the model) and requires no application code. In MyISAM this will have to be coded into the application, which is very difficult in web-servers. Web-servers are by nature very concurrent / parallel and because these actions should be atomical and MyISAM supports no real transactions, using MyISAM for web-servers is risky / error-prone.</p>\n\n<p>Also in most general cases, InnoDB will perform much better, for a multiple of reasons, one them being able to use record level locking as opposed to table-level locking. Not only in a situation where writes are more frequent than reads, also in situations with complex joins on large datasets. We noticed a 3 fold performance increase just by using InnoDB tables over MyISAM tables for very large joins (taking several minutes).</p>\n\n<p>I would say that in general InnoDB (using a 3NF datamodel complete with referential integrity) should be the default choice when using MySQL. MyISAM should only be used in very specific cases. It will most likely perform less, result in a bigger and more buggy application.</p>\n\n<p>Having said this. Datamodelling is an art seldom found among webdesigners / -programmers. No offence, but it does explain MyISAM being used so much.</p>\n"}, {'answer_id': 16127206, 'author': 'Arembjorn', 'author_id': 622675, 'author_profile': 'https://Stackoverflow.com/users/622675', 'pm_score': 4, 'selected': False, 'text': '<p><strong>Please note</strong> that my formal education and experience is with Oracle, while my work with MySQL has been entirely personal and on my own time, so if I say things that are true for Oracle but are not true for MySQL, I apologize.  While the two systems share a lot, the relational theory/algebra is the same, and relational databases are still relational databases, there are still plenty of differences!!</p>\n\n<p>I particularly like (as well as row-level locking) that InnoDB is transaction-based, meaning that you may be updating/inserting/creating/altering/dropping/etc several times for one "operation" of your web application.  The problem that arises is that if only <em>some</em> of those changes/operations end up being committed, but others do not, you will most times (depending on the specific design of the database) end up with a database with conflicting data/structure.  </p>\n\n<p><strong>Note:</strong> With Oracle, create/alter/drop statements are called "DDL" (Data Definition) statements, and implicitly trigger a commit.  Insert/update/delete statements, called "DML" (Data Manipulation), are <em>not</em> committed automatically, but only when a DDL, commit, or exit/quit is performed (or if you set your session to "auto-commit", or if your client auto-commits). It\'s imperative to be aware of that when working with Oracle, but I am not sure how MySQL handles the two types of statements.  Because of this, I want to make it clear that I\'m not sure of this when it comes to MySQL; only with Oracle.  </p>\n\n<h2>An example of when transaction-based engines excel:</h2>\n\n<p>Let\'s say that I or you are on a web-page to sign up to attend a free event, and one of the main purposes of the system is to only allow up to 100 people to sign up, since that is the limit of the seating for the event.  Once 100 sign-ups are reached, the system would disable further signups, at least until others cancel.</p>\n\n<p>In this case, there may be a table for guests (name, phone, email, etc.), and a second table which tracks the number of guests that have signed up.  We thus have two operations for one "transaction".  Now suppose that after the guest info is added to the GUESTS table, there is a connection loss, or an error with the same impact.  The GUESTS table was updated (inserted into), but the connection was lost before the "available seats" could be updated.</p>\n\n<p>Now we have a guest added to the guest table, but the number of available seats is now incorrect (for example, value is 85 when it\'s actually 84).</p>\n\n<p><em>Of course</em> there are many ways to handle this, such as tracking available seats with "100 minus number of rows in guests table," or some code that checks that the info is consistent, etc....\nBut with a transaction-based database engine such as InnoDB, either <em>ALL</em> of the operations are committed, or <em>NONE</em> of them are.  This can be helpful in many cases, but like I said, it\'s not the ONLY way to be safe, no (a nice way, however, handled by the database, not the programmer/script-writer).  </p>\n\n<p>That\'s all "transaction-based" essentially means in this context, unless I\'m missing something -- that either the whole transaction succeeds as it should, or <em>nothing</em> is changed, since making only partial changes could make a minor to SEVERE mess of the database, perhaps even corrupting it...</p>\n\n<p>But I\'ll say it one more time, it\'s not the only way to avoid making a mess.  But it is one of the methods that the engine itself handles, leaving you to code/script with only needing to worry about "was the transaction successful or not, and what do I do if not (such as retry)," instead of manually writing code to check it "manually" from outside of the database, and doing a lot more work for such events.</p>\n\n<h2>Lastly, a note about table-locking vs row-locking:</h2>\n\n<p><strong>DISCLAIMER:</strong>  I may be wrong in all that follows in regard to MySQL, and the hypothetical/example situations are things to look into, but I may be wrong in what <em>exactly</em> is possible to cause corruption with MySQL.  The examples are however very real in general programming, even if MySQL has more mechanisms to avoid such things...</p>\n\n<p>Anyway, I am fairly confident in agreeing with those who have argued that how many connections are allowed at a time <strong>does <em>not</em></strong> work around a locked table.  In fact, multiple connections <strong>are the entire point of locking a table!!</strong>  So that other processes/users/apps are not able to corrupt the database by making changes at the same time.</p>\n\n<p>How would two or more connections working on the same row make a REALLY BAD DAY for you??\nSuppose there are two processes both want/need to update the same value in the same row, let\'s say because the row is a record of a bus tour, and each of the two processes simultaneously want to update the "riders" or "available_seats" field as "the current value plus 1."</p>\n\n<p>Let\'s do this hypothetically, step by step:</p>\n\n<ol>\n<li>Process one reads the current value, let\'s say it\'s empty, thus \'0\' so far.  </li>\n<li>Process two reads the current value as well, which is still 0.</li>\n<li>Process one writes (current + 1) which is 1.</li>\n<li>Process two <em>should</em> be writing 2, but since it read the current value <em>before</em> process one write the new value, it too writes 1 to the table.</li>\n</ol>\n\n<p>I\'m <em>not certain</em> that two connections could intermingle like that, both reading before the first one writes...  But if not, then I would still see a problem with:</p>\n\n<ol>\n<li>Process one reads the current value, which is 0.</li>\n<li>Process one writes (current + 1), which is 1.</li>\n<li>Process two reads the current value now.  But while process one DID write (update), it has not committed the data, thus only that same process can read the new value that it updated, while all others see the older value, until there is a commit.</li>\n</ol>\n\n<p>Also, at least with Oracle databases, there are isolation levels, which I will not waste our time trying to paraphrase.  Here is a good article on that subject, and each isolation level having it\'s pros and cons, which would go along with how important transaction-based engines may be in a database...</p>\n\n<p>Lastly, there may likely be different safeguards in place within MyISAM, instead of foreign-keys and transaction-based interaction.  Well, for one, there is the fact that an entire table is locked, which makes it less likely that transactions/FKs are <em>needed</em>.  </p>\n\n<p>And alas, if you are aware of these concurrency issues, yes you can play it less safe and just write your applications, set up your systems so that such errors are not possible (your code is then responsible, rather than the database itself).  However, in my opinion, I would say that it is always best to use as many safeguards as possible, programming defensively, and always being aware that human error is impossible to completely avoid.  It happens to everyone, and anyone who says they are immune to it must be lying, or hasn\'t done more than write a "Hello World" application/script.  ;-)</p>\n\n<p>I hope that SOME of that is helpful to some one, and even more-so, I hope that I have not just now been a culprit of assumptions and being a human in error!!  My apologies if so, but the examples are good to think about, research the risk of, and so on, even if they are not potential in this specific context.</p>\n\n<p>Feel free to correct me, edit this "answer," even vote it down.  Just please try to improve, rather than correcting a bad assumption of mine with another.  ;-)</p>\n\n<p>This is my first response, so please forgive the length due to all the disclaimers, etc...  I just don\'t want to sound arrogant when I am not absolutely certain!</p>\n'}, {'answer_id': 16785740, 'author': 'Pankaj Khurana', 'author_id': 2413197, 'author_profile': 'https://Stackoverflow.com/users/2413197', 'pm_score': 5, 'selected': False, 'text': '<p>InnoDB offers:</p>\n\n<pre><code>ACID transactions\nrow-level locking\nforeign key constraints\nautomatic crash recovery\ntable compression (read/write)\nspatial data types (no spatial indexes)\n</code></pre>\n\n<p>In InnoDB all data in a row except for TEXT and BLOB can occupy 8,000 bytes at most. No full text indexing is available for InnoDB. In InnoDB the COUNT(*)s (when WHERE, GROUP BY, or JOIN is not used) execute slower than in MyISAM because the row count is not stored internally. InnoDB stores both data and indexes in one file. InnoDB uses a buffer pool to cache both data and indexes.</p>\n\n<p>MyISAM offers:</p>\n\n<pre><code>fast COUNT(*)s (when WHERE, GROUP BY, or JOIN is not used)\nfull text indexing\nsmaller disk footprint\nvery high table compression (read only)\nspatial data types and indexes (R-tree)\n</code></pre>\n\n<p>MyISAM has table-level locking, but no row-level locking. No transactions. No automatic crash recovery, but it does offer repair table functionality. No foreign key constraints. MyISAM tables are generally more compact in size on disk when compared to InnoDB tables. MyISAM tables could be further highly reduced in size by compressing with myisampack if needed, but become read-only. MyISAM stores indexes in one file and data in another. MyISAM uses key buffers for caching indexes and leaves the data caching management to the operating system.</p>\n\n<p>Overall I would recommend InnoDB for most purposes and MyISAM for specialized uses only. InnoDB is now the default engine in new MySQL versions.</p>\n'}, {'answer_id': 17706717, 'author': 'Bill Karwin', 'author_id': 20860, 'author_profile': 'https://Stackoverflow.com/users/20860', 'pm_score': 8, 'selected': False, 'text': "<p>People often talk about performance, reads vs. writes, foreign keys, etc. but there's one other must-have feature for a storage engine in my opinion:  <strong>atomic updates.</strong></p>\n\n<p>Try this:</p>\n\n<ol>\n<li>Issue an UPDATE against your MyISAM table that takes 5 seconds.</li>\n<li>While the UPDATE is in progress, say 2.5 seconds in, hit Ctrl-C to interrupt it.</li>\n<li>Observe the effects on the table.  How many rows were updated?  How many were not updated?  Is the table even readable, or was it corrupted when you hit Ctrl-C?</li>\n<li>Try the same experiment with UPDATE against an InnoDB table, interrupting the query in progress.</li>\n<li>Observe the InnoDB table.  <em>Zero</em> rows were updated.  InnoDB has assured you have atomic updates, and if the full update could not be committed, it rolls back the whole change.  Also, the table is not corrupt.  This works even if you use <code>killall -9 mysqld</code> to simulate a crash.</li>\n</ol>\n\n<p>Performance is desirable of course, but <em>not losing data</em> should trump that.</p>\n"}, {'answer_id': 18088402, 'author': 'tony gil', 'author_id': 1166727, 'author_profile': 'https://Stackoverflow.com/users/1166727', 'pm_score': 0, 'selected': False, 'text': '<p>bottomline: if you are working offline with selects on large chunks of data, MyISAM will probably give you better (much better) speeds.</p>\n\n<p>there are some situations when MyISAM is infinitely more efficient than InnoDB: when manipulating large data dumps offline (because of table lock).  </p>\n\n<p>example: I was converting a csv file (15M records) from NOAA which uses VARCHAR fields as keys.  InnoDB was taking forever, even with large chunks of memory available.</p>\n\n<p>this an example of the csv (first and third fields are keys).</p>\n\n<pre><code>USC00178998,20130101,TMAX,-22,,,7,0700\nUSC00178998,20130101,TMIN,-117,,,7,0700\nUSC00178998,20130101,TOBS,-28,,,7,0700\nUSC00178998,20130101,PRCP,0,T,,7,0700\nUSC00178998,20130101,SNOW,0,T,,7,\n</code></pre>\n\n<p>since what i need to do is run a batch offline update of observed weather phenomena, i use  MyISAM table for receiving data and run JOINS on the keys so that i can clean the incoming file and replace VARCHAR fields with INT keys (which are related to external tables where the original VARCHAR values are stored).</p>\n'}, {'answer_id': 18329730, 'author': 'Cyberwip', 'author_id': 2671238, 'author_profile': 'https://Stackoverflow.com/users/2671238', 'pm_score': 1, 'selected': False, 'text': "<p>Almost every time I start a new project I Google this same question to see if I come up with any new answers.</p>\n\n<p>It eventually boils down to - I take the latest version of MySQL and run tests.</p>\n\n<p>I have tables where I want to do key/value lookups... and that's all. I need to get the value (0-512 bytes) for a hash key. There is not a lot of transactions on this DB. The table gets updates occasionally (in it's entirety), but 0 transactions.</p>\n\n<p>So we're not talking about a complex system here, we are talking about a simple lookup,.. and how (other than making the table RAM resident) we can optimize performance.</p>\n\n<p>I also do tests on other databases (ie NoSQL) to see if there is anywhere I can get an advantage. The biggest advantage I have found is in key mapping but as far as the lookup goes, MyISAM is currently topping them all.</p>\n\n<p>Albeit, I wouldn't perform financial transactions with MyISAM tables but for simple lookups, you should test it out.. typically 2x to 5x the queries/sec.</p>\n\n<p>Test it, I welcome debate.</p>\n"}, {'answer_id': 20579257, 'author': 'kta', 'author_id': 539023, 'author_profile': 'https://Stackoverflow.com/users/539023', 'pm_score': 1, 'selected': False, 'text': '<p>If it is 70% inserts and 30% reads then it is more like on the InnoDB side.</p>\n'}, {'answer_id': 28070969, 'author': 'd4nyll', 'author_id': 3966682, 'author_profile': 'https://Stackoverflow.com/users/3966682', 'pm_score': 6, 'selected': False, 'text': '<p>A bit late to the game...but here\'s a quite comprehensive <a href="http://blog.danyll.com/myisam-vs-innodb/" rel="noreferrer">post I wrote a few months back</a>, detailing the major differences between MYISAM and InnoDB. Grab a cuppa (and maybe a biscuit), and enjoy.</p>\n\n<hr>\n\n<p>The major difference between MyISAM and InnoDB is in referential integrity and transactions. There are also other difference such as locking, rollbacks, and full-text searches.</p>\n\n<h2>Referential Integrity</h2>\n\n<p>Referential integrity ensures that relationships between tables remains consistent. More specifically, this means when a table (e.g. Listings) has a foreign key (e.g. Product ID) pointing to a different table (e.g. Products), when updates or deletes occur to the pointed-to table, these changes are cascaded to the linking table. In our example, if a product is renamed, the linking table’s foreign keys will also update; if a product is deleted from the ‘Products’ table, any listings which point to the deleted entry will also be deleted. Furthermore, any new listing must have that foreign key pointing to a valid, existing entry.</p>\n\n<p>InnoDB is a relational DBMS (RDBMS) and thus has referential integrity, while MyISAM does not.</p>\n\n<h2>Transactions &amp; Atomicity</h2>\n\n<p>Data in a table is managed using Data Manipulation Language (DML) statements, such as SELECT, INSERT, UPDATE and DELETE. A transaction group two or more DML statements together into a single unit of work, so either the entire unit is applied, or none of it is.</p>\n\n<p>MyISAM do not support transactions whereas InnoDB does.</p>\n\n<p>If an operation is interrupted while using a MyISAM table, the operation is aborted immediately, and the rows (or even data within each row) that are affected remains affected, even if the operation did not go to completion.</p>\n\n<p>If an operation is interrupted while using an InnoDB table, because it using transactions, which has atomicity, any transaction which did not go to completion will not take effect, since no commit is made.</p>\n\n<h2>Table-locking vs Row-locking</h2>\n\n<p>When a query runs against a MyISAM table, the entire table in which it is querying will be locked. This means subsequent queries will only be executed after the current one is finished. If you are reading a large table, and/or there are frequent read and write operations, this can mean a huge backlog of queries.</p>\n\n<p>When a query runs against an InnoDB table, only the row(s) which are involved are locked, the rest of the table remains available for CRUD operations. This means queries can run simultaneously on the same table, provided they do not use the same row.</p>\n\n<p>This feature in InnoDB is known as concurrency. As great as concurrency is, there is a major drawback that applies to a select range of tables, in that there is an overhead in switching between kernel threads, and you should set a limit on the kernel threads to prevent the server coming to a halt.</p>\n\n<h2>Transactions &amp; Rollbacks</h2>\n\n<p>When you run an operation in MyISAM, the changes are set; in InnoDB, those changes can be rolled back. The most common commands used to control transactions are COMMIT, ROLLBACK and SAVEPOINT. 1. COMMIT - you can write multiple DML operations, but the changes will only be saved when a COMMIT is made 2. ROLLBACK - you can discard any operations that have not yet been committed yet 3. SAVEPOINT - sets a point in the list of operations to which a ROLLBACK operation can rollback to</p>\n\n<h2>Reliability</h2>\n\n<p>MyISAM offers no data integrity - Hardware failures, unclean shutdowns and canceled operations can cause the data to become corrupt. This would require full repair or rebuilds of the indexes and tables.</p>\n\n<p>InnoDB, on the other hand, uses a transactional log, a double-write buffer and automatic checksumming and validation to prevent corruption. Before InnoDB makes any changes, it records the data before the transactions into a system tablespace file called ibdata1. If there is a crash, InnoDB would autorecover through the replay of those logs.</p>\n\n<h2>FULLTEXT Indexing</h2>\n\n<p>InnoDB does not support FULLTEXT indexing until MySQL version 5.6.4. As of the writing of this post, many shared hosting providers’ MySQL version is still below 5.6.4, which means FULLTEXT indexing is not supported for InnoDB tables.</p>\n\n<p>However, this is not a valid reason to use MyISAM. It’s best to change to a hosting provider that supports up-to-date versions of MySQL. Not that a MyISAM table that uses FULLTEXT indexing cannot be converted to an InnoDB table.</p>\n\n<h2>Conclusion</h2>\n\n<p>In conclusion, InnoDB should be your default storage engine of choice. Choose MyISAM or other data types when they serve a specific need.</p>\n'}, {'answer_id': 28396656, 'author': 'Light93', 'author_id': 2049786, 'author_profile': 'https://Stackoverflow.com/users/2049786', 'pm_score': 2, 'selected': False, 'text': '<p>In short, InnoDB is good if you are working on something that needs a reliable database that can handles a lot of INSERT and UPDATE instructions.</p>\n\n<p>and, MyISAM is good if you needs a database that will mostly be taking a lot of  read (SELECT) instructions rather than write (INSERT and UPDATES), considering its drawback on the table-lock thing.</p>\n\n<p>you may want to check out;<br />\n<a href="https://www.sitepoint.com/mysql-innodb-table-pros-cons/" rel="nofollow noreferrer">Pros and Cons of InnoDB</a><br />\n<a href="https://www.sitepoint.com/mysql-myisam-table-pros-con/" rel="nofollow noreferrer">Pros and Cons of MyISAM</a></p>\n'}, {'answer_id': 30776508, 'author': 'StackG', 'author_id': 3403718, 'author_profile': 'https://Stackoverflow.com/users/3403718', 'pm_score': 6, 'selected': False, 'text': '<p>To add to the wide selection of responses here covering the mechanical differences between the two engines, I present an empirical speed comparison study.</p>\n<p>In terms of pure speed, it is not always the case that MyISAM is faster than InnoDB but in my experience it tends to be faster for PURE READ working environments by a factor of about 2.0-2.5 times. Clearly this isn\'t appropriate for all environments - as others have written, MyISAM lacks such things as transactions and foreign keys.</p>\n<p>I\'ve done a bit of benchmarking below - I\'ve used python for looping and the timeit library for timing comparisons. For interest I\'ve also included the memory engine, this gives the best performance across the board although it is only suitable for smaller tables (you continually encounter <code>The table \'tbl\' is full</code> when you exceed the MySQL memory limit). The four types of select I look at are:</p>\n<ol>\n<li>vanilla SELECTs</li>\n<li>counts</li>\n<li>conditional SELECTs</li>\n<li>indexed and non-indexed sub-selects</li>\n</ol>\n<p>Firstly, I created three tables using the following SQL</p>\n<pre><code>CREATE TABLE\n    data_interrogation.test_table_myisam\n    (\n        index_col BIGINT NOT NULL AUTO_INCREMENT,\n        value1 DOUBLE,\n        value2 DOUBLE,\n        value3 DOUBLE,\n        value4 DOUBLE,\n        PRIMARY KEY (index_col)\n    )\n    ENGINE=MyISAM DEFAULT CHARSET=utf8\n</code></pre>\n<p>with \'MyISAM\' substituted for \'InnoDB\' and \'memory\' in the second and third tables.</p>\n<p>\xa0</p>\n<h1>1) Vanilla selects</h1>\n<p>Query: <code>SELECT * FROM tbl WHERE index_col = xx</code></p>\n<p>Result: <strong>draw</strong></p>\n<p><img src="https://i.stack.imgur.com/zVt8y.png" alt="Comparison of vanilla selects by different database engines" /></p>\n<p>The speed of these is all broadly the same, and as expected is linear in the number of columns to be selected. InnoDB seems <em>slightly</em> faster than MyISAM but this is really marginal.</p>\n<p>Code:</p>\n<pre><code>import timeit\nimport MySQLdb\nimport MySQLdb.cursors\nimport random\nfrom random import randint\n\ndb = MySQLdb.connect(host=&quot;...&quot;, user=&quot;...&quot;, passwd=&quot;...&quot;, db=&quot;...&quot;, cursorclass=MySQLdb.cursors.DictCursor)\ncur = db.cursor()\n\nlengthOfTable = 100000\n\n# Fill up the tables with random data\nfor x in xrange(lengthOfTable):\n    rand1 = random.random()\n    rand2 = random.random()\n    rand3 = random.random()\n    rand4 = random.random()\n\n    insertString = &quot;INSERT INTO test_table_innodb (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n    insertString2 = &quot;INSERT INTO test_table_myisam (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n    insertString3 = &quot;INSERT INTO test_table_memory (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n\n    cur.execute(insertString)\n    cur.execute(insertString2)\n    cur.execute(insertString3)\n\ndb.commit()\n\n# Define a function to pull a certain number of records from these tables\ndef selectRandomRecords(testTable,numberOfRecords):\n\n    for x in xrange(numberOfRecords):\n        rand1 = randint(0,lengthOfTable)\n\n        selectString = &quot;SELECT * FROM &quot; + testTable + &quot; WHERE index_col = &quot; + str(rand1)\n        cur.execute(selectString)\n\nsetupString = &quot;from __main__ import selectRandomRecords&quot;\n\n# Test time taken using timeit\nmyisam_times = []\ninnodb_times = []\nmemory_times = []\n\nfor theLength in [3,10,30,100,300,1000,3000,10000]:\n\n    innodb_times.append( timeit.timeit(\'selectRandomRecords(&quot;test_table_innodb&quot;,\' + str(theLength) + \')\', number=100, setup=setupString) )\n    myisam_times.append( timeit.timeit(\'selectRandomRecords(&quot;test_table_myisam&quot;,\' + str(theLength) + \')\', number=100, setup=setupString) )\n    memory_times.append( timeit.timeit(\'selectRandomRecords(&quot;test_table_memory&quot;,\' + str(theLength) + \')\', number=100, setup=setupString) )\n</code></pre>\n<p>\xa0</p>\n<h1>2) Counts</h1>\n<p>Query: <code>SELECT count(*) FROM tbl</code></p>\n<p>Result: <strong>MyISAM wins</strong></p>\n<p><img src="https://i.stack.imgur.com/F2sYk.png" alt="Comparison of counts by different database engines" /></p>\n<p>This one demonstrates a big difference between MyISAM and InnoDB - MyISAM (and memory) keeps track of the number of records in the table, so this transaction is fast and O(1). The amount of time required for InnoDB to count increases super-linearly with table size in the range I investigated. I suspect many of the speed-ups from MyISAM queries that are observed in practice are due to similar effects.</p>\n<p>Code:</p>\n<pre><code>myisam_times = []\ninnodb_times = []\nmemory_times = []\n\n# Define a function to count the records\ndef countRecords(testTable):\n\n    selectString = &quot;SELECT count(*) FROM &quot; + testTable\n    cur.execute(selectString)\n\nsetupString = &quot;from __main__ import countRecords&quot;\n\n# Truncate the tables and re-fill with a set amount of data\nfor theLength in [3,10,30,100,300,1000,3000,10000,30000,100000]:\n\n    truncateString = &quot;TRUNCATE test_table_innodb&quot;\n    truncateString2 = &quot;TRUNCATE test_table_myisam&quot;\n    truncateString3 = &quot;TRUNCATE test_table_memory&quot;\n\n    cur.execute(truncateString)\n    cur.execute(truncateString2)\n    cur.execute(truncateString3)\n\n    for x in xrange(theLength):\n        rand1 = random.random()\n        rand2 = random.random()\n        rand3 = random.random()\n        rand4 = random.random()\n\n        insertString = &quot;INSERT INTO test_table_innodb (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n        insertString2 = &quot;INSERT INTO test_table_myisam (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n        insertString3 = &quot;INSERT INTO test_table_memory (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n\n        cur.execute(insertString)\n        cur.execute(insertString2)\n        cur.execute(insertString3)\n\n    db.commit()\n\n    # Count and time the query\n    innodb_times.append( timeit.timeit(\'countRecords(&quot;test_table_innodb&quot;)\', number=100, setup=setupString) )\n    myisam_times.append( timeit.timeit(\'countRecords(&quot;test_table_myisam&quot;)\', number=100, setup=setupString) )\n    memory_times.append( timeit.timeit(\'countRecords(&quot;test_table_memory&quot;)\', number=100, setup=setupString) )\n</code></pre>\n<p>\xa0</p>\n<h1>3) Conditional selects</h1>\n<p>Query: <code>SELECT * FROM tbl WHERE value1&lt;0.5 AND value2&lt;0.5 AND value3&lt;0.5 AND value4&lt;0.5</code></p>\n<p>Result: <strong>MyISAM wins</strong></p>\n<p><img src="https://i.stack.imgur.com/2MwCZ.png" alt="Comparison of conditional selects by different database engines" /></p>\n<p>Here, MyISAM and memory perform approximately the same, and beat InnoDB by about 50% for larger tables. This is the sort of query for which the benefits of MyISAM seem to be maximised.</p>\n<p>Code:</p>\n<pre><code>myisam_times = []\ninnodb_times = []\nmemory_times = []\n\n# Define a function to perform conditional selects\ndef conditionalSelect(testTable):\n    selectString = &quot;SELECT * FROM &quot; + testTable + &quot; WHERE value1 &lt; 0.5 AND value2 &lt; 0.5 AND value3 &lt; 0.5 AND value4 &lt; 0.5&quot;\n    cur.execute(selectString)\n\nsetupString = &quot;from __main__ import conditionalSelect&quot;\n\n# Truncate the tables and re-fill with a set amount of data\nfor theLength in [3,10,30,100,300,1000,3000,10000,30000,100000]:\n\n    truncateString = &quot;TRUNCATE test_table_innodb&quot;\n    truncateString2 = &quot;TRUNCATE test_table_myisam&quot;\n    truncateString3 = &quot;TRUNCATE test_table_memory&quot;\n\n    cur.execute(truncateString)\n    cur.execute(truncateString2)\n    cur.execute(truncateString3)\n\n    for x in xrange(theLength):\n        rand1 = random.random()\n        rand2 = random.random()\n        rand3 = random.random()\n        rand4 = random.random()\n\n        insertString = &quot;INSERT INTO test_table_innodb (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n        insertString2 = &quot;INSERT INTO test_table_myisam (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n        insertString3 = &quot;INSERT INTO test_table_memory (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n\n        cur.execute(insertString)\n        cur.execute(insertString2)\n        cur.execute(insertString3)\n\n    db.commit()\n\n    # Count and time the query\n    innodb_times.append( timeit.timeit(\'conditionalSelect(&quot;test_table_innodb&quot;)\', number=100, setup=setupString) )\n    myisam_times.append( timeit.timeit(\'conditionalSelect(&quot;test_table_myisam&quot;)\', number=100, setup=setupString) )\n    memory_times.append( timeit.timeit(\'conditionalSelect(&quot;test_table_memory&quot;)\', number=100, setup=setupString) )\n</code></pre>\n<p>\xa0</p>\n<h1>4) Sub-selects</h1>\n<p>Result: <strong>InnoDB wins</strong></p>\n<p>For this query, I created an additional set of tables for the sub-select. Each is simply two columns of BIGINTs, one with a primary key index and one without any index. Due to the large table size, I didn\'t test the memory engine. The SQL table creation command was</p>\n<pre><code>CREATE TABLE\n    subselect_myisam\n    (\n        index_col bigint NOT NULL,\n        non_index_col bigint,\n        PRIMARY KEY (index_col)\n    )\n    ENGINE=MyISAM DEFAULT CHARSET=utf8;\n</code></pre>\n<p>where once again, \'MyISAM\' is substituted for \'InnoDB\' in the second table.</p>\n<p>In this query, I leave the size of the selection table at 1000000 and instead vary the size of the sub-selected columns.</p>\n<p><img src="https://i.stack.imgur.com/mrhOp.png" alt="Comparison of sub-selects by different database engines" /></p>\n<p>Here the InnoDB wins easily. After we get to a reasonable size table both engines scale linearly with the size of the sub-select. The index speeds up the MyISAM command but interestingly has little effect on the InnoDB speed.\nsubSelect.png</p>\n<p>Code:</p>\n<pre><code>myisam_times = []\ninnodb_times = []\nmyisam_times_2 = []\ninnodb_times_2 = []\n\ndef subSelectRecordsIndexed(testTable,testSubSelect):\n    selectString = &quot;SELECT * FROM &quot; + testTable + &quot; WHERE index_col in ( SELECT index_col FROM &quot; + testSubSelect + &quot; )&quot;\n    cur.execute(selectString)\n\nsetupString = &quot;from __main__ import subSelectRecordsIndexed&quot;\n\ndef subSelectRecordsNotIndexed(testTable,testSubSelect):\n    selectString = &quot;SELECT * FROM &quot; + testTable + &quot; WHERE index_col in ( SELECT non_index_col FROM &quot; + testSubSelect + &quot; )&quot;\n    cur.execute(selectString)\n\nsetupString2 = &quot;from __main__ import subSelectRecordsNotIndexed&quot;\n\n# Truncate the old tables, and re-fill with 1000000 records\ntruncateString = &quot;TRUNCATE test_table_innodb&quot;\ntruncateString2 = &quot;TRUNCATE test_table_myisam&quot;\n\ncur.execute(truncateString)\ncur.execute(truncateString2)\n\nlengthOfTable = 1000000\n\n# Fill up the tables with random data\nfor x in xrange(lengthOfTable):\n    rand1 = random.random()\n    rand2 = random.random()\n    rand3 = random.random()\n    rand4 = random.random()\n\n    insertString = &quot;INSERT INTO test_table_innodb (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n    insertString2 = &quot;INSERT INTO test_table_myisam (value1,value2,value3,value4) VALUES (&quot; + str(rand1) + &quot;,&quot; + str(rand2) + &quot;,&quot; + str(rand3) + &quot;,&quot; + str(rand4) + &quot;)&quot;\n\n    cur.execute(insertString)\n    cur.execute(insertString2)\n\nfor theLength in [3,10,30,100,300,1000,3000,10000,30000,100000]:\n\n    truncateString = &quot;TRUNCATE subselect_innodb&quot;\n    truncateString2 = &quot;TRUNCATE subselect_myisam&quot;\n\n    cur.execute(truncateString)\n    cur.execute(truncateString2)\n\n    # For each length, empty the table and re-fill it with random data\n    rand_sample = sorted(random.sample(xrange(lengthOfTable), theLength))\n    rand_sample_2 = random.sample(xrange(lengthOfTable), theLength)\n\n    for (the_value_1,the_value_2) in zip(rand_sample,rand_sample_2):\n        insertString = &quot;INSERT INTO subselect_innodb (index_col,non_index_col) VALUES (&quot; + str(the_value_1) + &quot;,&quot; + str(the_value_2) + &quot;)&quot;\n        insertString2 = &quot;INSERT INTO subselect_myisam (index_col,non_index_col) VALUES (&quot; + str(the_value_1) + &quot;,&quot; + str(the_value_2) + &quot;)&quot;\n\n        cur.execute(insertString)\n        cur.execute(insertString2)\n\n    db.commit()\n\n    # Finally, time the queries\n    innodb_times.append( timeit.timeit(\'subSelectRecordsIndexed(&quot;test_table_innodb&quot;,&quot;subselect_innodb&quot;)\', number=100, setup=setupString) )\n    myisam_times.append( timeit.timeit(\'subSelectRecordsIndexed(&quot;test_table_myisam&quot;,&quot;subselect_myisam&quot;)\', number=100, setup=setupString) )\n        \n    innodb_times_2.append( timeit.timeit(\'subSelectRecordsNotIndexed(&quot;test_table_innodb&quot;,&quot;subselect_innodb&quot;)\', number=100, setup=setupString2) )\n    myisam_times_2.append( timeit.timeit(\'subSelectRecordsNotIndexed(&quot;test_table_myisam&quot;,&quot;subselect_myisam&quot;)\', number=100, setup=setupString2) )\n</code></pre>\n<p>I think the take-home message of all of this is that if you are <em>really</em> concerned about speed, you need to benchmark the queries that you\'re doing rather than make any assumptions about which engine will be more suitable.</p>\n'}, {'answer_id': 36991969, 'author': 'pilavdzice', 'author_id': 397048, 'author_profile': 'https://Stackoverflow.com/users/397048', 'pm_score': 2, 'selected': False, 'text': "<p>I know this won't be popular but here goes:</p>\n\n<p>myISAM lacks support for database essentials like transactions and referential integrity which often results in glitchy / buggy applications. You cannot not learn proper database design fundamentals if they are not even supported by your db engine. </p>\n\n<p>Not using referential integrity or transactions in the database world is like not using object oriented programming in the software world. </p>\n\n<p>InnoDB exists now, use that instead! Even MySQL developers have finally conceded to change this to the default engine in newer versions, despite myISAM being the original engine that was the default in all legacy systems. </p>\n\n<p>No it does not matter if you are reading or writing or what performance considerations you have, using myISAM can result in a variety of problems, such as this one I just ran into: I was performing a database sync and at the same time someone else accessed an application that accessed a table set to myISAM. Due to the lack of transaction support and the generally poor reliability of this engine, this crashed the entire database and I had to manually restart mysql!</p>\n\n<p>Over the past 15 years of development I have used many databases and engines.  myISAM crashed on me about a dozen times during this period, other databases, only once! And that was a microsoft SQL database where some developer wrote faulty CLR code (common language runtime - basically C# code that executes inside the database) by the way, it was not the database engine's fault exactly.</p>\n\n<p>I agree with the other answers here that say that <strong>quality high-availability, high-performance applications should not use myISAM as it will not work, it is not robust or stable enough to result in a frustration-free experience.</strong> See Bill Karwin's answer for more details.</p>\n\n<p>P.S. Gotta love it when myISAM fanboys downvote but can't tell you which part of this answer is incorrect.</p>\n"}, {'answer_id': 43767498, 'author': 'Rick James', 'author_id': 1766831, 'author_profile': 'https://Stackoverflow.com/users/1766831', 'pm_score': 5, 'selected': False, 'text': '<p><em><strong>The Question and most of the Answers are out of date</strong></em>.</p>\n\n<p>Yes, it is an old wives\' tale that MyISAM is faster than InnoDB.  notice the Question\'s date:  2008; it is now almost a decade later.  InnoDB has made significant performance strides since then.</p>\n\n<p>The dramatic graph was for the one case where MyISAM wins: <code>COUNT(*)</code> <em>without</em> a <code>WHERE</code> clause.  But is that really what you spend your time doing?</p>\n\n<p>If you run <em>concurrency</em> test, InnoDB is very likely to win, <em>even against <code>MEMORY</code></em>.</p>\n\n<p>If you do any writes while benchmarking <code>SELECTs</code>, MyISAM and <code>MEMORY</code> are likely to lose because of table-level locking.</p>\n\n<p>In fact, Oracle is so sure that InnoDB is better that they have all but removed MyISAM from 8.0.</p>\n\n<p>The <em>Question</em> was written early in the days of 5.1.  Since then, these major versions were marked "General Availability":</p>\n\n<ul>\n<li>2010: 5.5 (.8 in Dec.)</li>\n<li>2013: 5.6 (.10 in Feb.)</li>\n<li>2015: 5.7 (.9 in Oct.)</li>\n<li>2018: 8.0 (.11 in Apr.)</li>\n</ul>\n\n<p><em><strong>Bottom line:  Don\'t use MyISAM</strong></em></p>\n'}]
['https://Stackoverflow.com/questions/20148', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2013/']