MyISAM and InnoDB tables in one database?

These days, I always default to using InnoDB, especially on the write-intensive tables you mention where MyISAM suffers from full table locking. Here's a to-the-point comparison Reasons to use MyISAM: Tables are really fast for select-heavy loads Table level locks limit their scalability for write intensive multi-user environments Smallest disk space consumption Fulltext index Merged and compressed tables Reasons to use InnoDB: ACID transactions Row level locking Consistent reads – allows you to reach excellent read write concurrency Primary key clustering – gives excellent performance in some cases Foreign key support Both index and data pages can be cached Automatic crash recovery – in case MySQL shutdown was unclean InnoDB tables will still - recover to the consistent state- No check / repair like MyISAM may require All updates have to pass through transactional engine in InnoDB, which often decreases - performance compared to non-transactional storage engines The above was taken from this site, which no longer seems to be working.

These days, I always default to using InnoDB, especially on the write-intensive tables you mention where MyISAM suffers from full table locking. Here's a to-the-point comparison. Reasons to use MyISAM: Tables are really fast for select-heavy loads Table level locks limit their scalability for write intensive multi-user environments.

Smallest disk space consumption Fulltext index Merged and compressed tables. Reasons to use InnoDB: ACID transactions Row level locking Consistent reads – allows you to reach excellent read write concurrency. Primary key clustering – gives excellent performance in some cases.

Foreign key support. Both index and data pages can be cached. Automatic crash recovery – in case MySQL shutdown was unclean InnoDB tables will still - recover to the consistent state- No check / repair like MyISAM may require.

All updates have to pass through transactional engine in InnoDB, which often decreases - performance compared to non-transactional storage engines. The above was taken from this site, which no longer seems to be working.

1 Your follow up concern regarding COUNT(*) is well-founded. InnoDB does not keep an internal count of rows in a table, so performing a SELECT COUNT(*) does do a full table scan. Whereas such a query would require no time with MyISAM, an equivalent InnoDB query could take many seconds for 1mil rows.

The typical solution is to maintain another "counter table" where you would manually increment and decrement depending on whether you inserted or removed a countable row. You can find more here: dev.mysql. Com/doc/refman/5.0/en/innodb-restrictions.

Html under "SHOW TABLE STATUS". – BrainCore Jan 22 '10 at 3:58.

Pros and cons for each. For (1) pros: less disk space usage, myisam much faster for read-heavy access patterns cons: memory must be shared between the innodb buffers and myisam key buffers. Innodb tables are about 4x bigger than their myisam counterparts.

Programmatic code must be adapted for deadlock handling. Just remember innodb will also lock if you're changing an indexed column or primary key.

I have a database with about 30 tables and 5 tables of them is write-intensive. Convert all tables to use InnoDB engine. I wonder which approach is better?

The reason I want to keep some table on MyISAM engine is some of them has around 1,000,000 rows. I'm not sure how slower it will be for queries like "SELECT COUNT(*)" on these tables after converted to InnoDB. I haven't done a test.

I prefer getting some advices from any of you before start the switch.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions