Skip to main content

Optimisation

====================================================================================

MySQL Optimisation

====================================================================================

MySQL Tuner Script

wget -O mysqltuner.pl mysqltuner.pl && perl mysqltuner.pl 

------------------------------------------------------------------------------------------------------------------------------------------------

Implementing Variable Changes

/etc/my.cnf

------------------------------------------------------------------------------------------------------------------------------------------------

MyISAM v InnoDB

InnoDB has row-level locking. MyISAM only has full table-level locking. 

Check table engine: 

SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE  
FROM information_schema.TABLES  
WHERE ENGINE = 'MyISAM'; 

List table engine in text file:

mysql –e "SELECT TABLE_SCHEMA, TABLE_NAME, ENGINE  
FROM information_schema.TABLES  
WHERE ENGINE = 'MyISAM';" > mysql_tableengine.txt 

------------------------------------------------------------------------------------------------------------------------------------------------

Changing Table Engine

------------------------------------------------------------------------------------------------------------------------------------------------