Performance issues: Drupal 6.26 database versus Drupal 6.25 database InnoDB versus MyISAM
submitted by pvanerk on Sun, 06/24/2012 - 10:01
Drupal 7 is using InnoDB as default database engine. When you create a database in Drupal 6.26, it is already using the InnoDB engine for the database.
I had really performance issues running this database on my Ubuntu setup. It seems InnoDB has some trouble on my system to count the records in a table. Didn't do much investigating on this issue, because I had some deadlines coming up. Quick workaround: Change the database engine for all your tables back to MyISAM. Try this script (thanks to Danreb).
$dbServer // Database server, commonly use value is localhost
$dbUser// Database User, the one with priveleges to your database
$dbPass // Password of the Database User
$dbName // The database you want to convert from InnoDB to MyISAM
<?php // display error is On for us to be notified if there's something wrong ini_set('display_errors', 'On'); error_reporting(E_ALL); // Config, change this variables $dbServer = "localhost"; $dbUser = "root"; $dbPass = " "; $dbName = "testdb"; // Set a connection for our database $link = mysql_connect($dbServer, $dbUser, $dbPass) or die("unable to connect to msql server: " . mysql_error()); // Select our database mysql_select_db($dbName, $link) or die("unable to select database 'db': " . mysql_error()); $result = mysql_query("show tables"); if (!$result) { die('query failed: '); } // Use while loop to convert all tables to MyISAM while ($row = mysql_fetch_array($result)){ // Command Reference: ALTER TABLE tableName ENGINE=MyISAM mysql_query("ALTER TABLE ".$row[0]." ENGINE=MyISAM; "); } ?> You can run this php code using the 'Execute PHP code' link in your devel menu.