2

I have a database with 48 tables and 45 of the tables are InnoDB.

I have 3 MyISAM tables which range in size from 200 records to 1.5Mil and also a 6.5Mil entries.

These 3 tables contain GEO Location information and are read only (never write - unless i was to update one - extremely infrequently).

I considered changing them to InnoDB to make the database 100% the same but then read the MYiSAM is faster. Note: I don't need any of the special INNODB functions - its just selects/joins... thats it.

Should I keep these MyISAM or change them to InnoDB?

thx

4 Answers 4

4

MyISAM used to be faster years ago, but if you use any reasonably current version of InnoDB, then InnoDB is faster for most workloads. Here's a performance comparison from way back in 2007 that shows InnoDB already matched or bettered MyISAM in all but a few types of queries.

http://www.mysqlperformanceblog.com/2007/01/08/innodb-vs-myisam-vs-falcon-benchmarks-part-1/

Since that test in 2007, InnoDB has continued to get better, whereas the MySQL developers have spent virtually no time improving MyISAM. It's dead, Jim.

The only cases where MyISAM may be faster is when doing full table-scans, and you should try to define indexes to avoid table-scans anyway.

InnoDB has been the default storage engine in MySQL since 5.5 (circa 2010). With each major version of MySQL, it becomes more clear that MyISAM is going away.

InnoDB has many benefits even if you don't use the explicit features like transactions or foreign keys. Try this:

  1. Execute a long-running UPDATE against a MyISAM table.
  2. Interrupt it partway through. How many rows have been changed? Some, but not all.
  3. Repeat the same test with an InnoDB table. How many rows have been changed? Zero!

InnoDB supports atomic changes, so every SQL statement either succeeds completely, or else rolls back. You won't get partially-completed changes.

InnoDB also support crash recovery, so you won't lose data if mysqld ever crashes. MyISAM is renowned for corrupting tables during a crash.

InnoDB also caches data in RAM (the InnoDB buffer pool), whereas MyISAM relies on the filesystem cache to speed up data I/O. This makes some queries a lot faster in InnoDB if you have enough RAM.

Use MyISAM only if you don't care about your data.

0

No need to change In INNODB. As you say thay have lot of records SO thay are faster as MYISAM

MyISAM in most cases will be faster than InnoDB for run of the mill sort of work. Selecting, updating and inserting are all very speedy under normal circumstances.

1
  • To put it another way, InnoDB's main benefits tend to be related to writing: row-level locking allows more simultaneous writes during high concurrency and ACID compliance / journalling enables safer and atomic writes. That said, InnoDB is still fast, it just does a lot of stuff that becomes meaningless for read-only tables. MyISAM is faster in some cases, but it's worth testing your particular workload as there are things that each do faster. InnoDB is now the default and there is value in using the default unless there's a compelling reason otherwise as it can simplify configuration, etc. Commented Feb 23, 2017 at 2:20
0

I wouldn't bother changing it. I was just researching the same thing and came across this useful post: http://www.kavoir.com/2009/09/mysql-engines-innodb-vs-myisam-a-comparison-of-pros-and-cons.html

The main reason you'd want Innodb would be for data integrity and to avoid locking the entire table on inserts. But if you're not doing a lot of inserts and these are not high traffic tables, then why make the change?

0

No change is necessary, i am working on similar project where the database is going to be used for read-only and Myisam is the best option for it.

In addition you can even use sphinx if you want faster reads.

hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.