Tuesday, August 25, 2015

Mysql

SET GLOBAL slow_launch_time = 1;
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL log_queries_not_using_indexes = 'ON';
SET GLOBAL slow_query_log_file ='/var/lib/mysql/slow-query-log.log';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE '%slow%';

#FLUSH LOGS;


SHOW GLOBAL STATUS LIKE 'Connections';
SHOW GLOBAL STATUS LIKE 'Threads_created';
SHOW GLOBAL STATUS LIKE 'Max_used_connections';

#Threads_created / Connections > 0.01
#increase thread_cache_size where thread_cache_size > Max_used_connections

No comments:

Post a Comment

How to revert comments Youtube layout?

#see video for details  https://www.youtube.com/watch?v=J0L_nYtNlqs #uBlock Origin  https://chrome.google.com/webstore/detail/ublock-o...