How To Optimize A Table In MySQL Or MariaDB
January 4, 2018
http://stackoverflow.com/questions/5474662/mysql-optimize-all-tables
$ mysqlcheck -u root -p -o dbnameIn MariaDB you will see:...
note : Table does not support optimize, doing recreate + analyze instead
status : OKinformation for the result above is below. Basically, InnoDB (the storage engine used my MariaDB) is doing a different set of tasks to accomplish the same thing as MyISAM.http://stackoverflow.com/questions/30635603/what-does-table-does-not-support-optimize-doing-recreate-analyze-instead-mehttp://stackoverflow.com/questions/30692812/mysql-user-db-does-not-have-password-columns-installing-mysql-on-osxSetting the query_cache_type
https://www.percona.com/blog/2009/11/16/table_cache-negative-scalability/https://blogs.n1zyy.com/n1zyy/tutorials/enabling-mysqls-query-cache/http://www.techpaste.com/2013/01/query-cache-mysql-server/https://mariadb.com/kb/en/mariadb/optimizing-table_open_cache/setting the query_cache_type to 1 (per mysqltuner recommendations):$ sudo nano /etc/mysql/mysql.conf.d/mysqld.cnfchange the query_cache_type to 1 in the [mysqld] section so it looks like this:...
[mysqld]
...
query_cache_type = 1
query_cache_limit = 1M
query_cache_size = 16M
...restart mysqld/etc/init.d/mysql restartALSO SEE:
https://mariadb.com/resources/blog/starting-mysql-low-memory-virtual-machinesin the my.cnf file (/etc/mysql/my.cnf), disable Performance Schema by putting this under the [mysqld] section configuration:performance_schema = off
Posted in Tutorials