Posted by vacilando on September 24, 2010 at 3:59pm
Hi,
I am moving existing sites from various servers to Pressflow. Looking at the tables, I see a mixture of MyISAM and InnoDB tables.
I understand that Pressflow uses InnodDB as the default storage engine. And I see in many places InnoDB usually makes Drupal fast (e.g. see this).
Two questions:
1) If one built a website from scratch in Pressflow, would all tables use InnoDB instead of MyISAM? In other words, is it (probably) good to convert ALL MyISAM tables to InnoDB or only a few of them?
2) Can somebody please share a snippet that of code that would convert a number (all within a database) MyISAM tables to InnoDB?
Thanks!

Comments
The DB Tuner module lets you
The DB Tuner module lets you convert (all) tables to InnoDB. It also lets you add indexes, tests for slow views queries and checks your MySQL config.
But I also wonder about the necessity of InnoDB. I read a 2Bits article where they only convert some tables to InnoDB, like the sessions table. Only a handful, not all of them.
This SQL snippet converts all
This SQL snippet converts all tables to InnoDB (no changes needed, just run it exactly like this):
SELECT CONCAT(CONCAT('ALTER TABLE `',table_name,'`'),' ENGINE=INNODB;') FROM INFORMATION_SCHEMA.tables WHERE table_type='BASE TABLE'
Convert a single table like this:
ALTER TABLE my_table ENGINE=INNODB;re: From MyISAM to InnoDB
Yes, if you built a website from scratch in Pantheon, all the DB tables would be InnoDB.
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com
Thanks, Greg, but what about
Thanks, Greg, but what about all the tables that are then added by contrib modules... would they all also be in InnoDB?
---
Tomáš J. Fülöpp
http://twitter.com/vacilandois
re: Thanks, Greg, but what about
Yes, unless they specify the type of tables to be added, the default storage engine in the /etc/mysql/my.cnf file is InnoDB.
Greg
--
Greg Coit
Systems Administrator
http://www.chapterthree.com