mysql cache check

SHOW GLOBAL VARIABLES LIKE „long_query_time“;

SHOW VARIABLES LIKE '%query_cache%';
SHOW VARIABLES LIKE '%query%';
SET GLOBAL general_log = 0;
SHOW VARIABLES LIKE '%general_log%';
SET GLOBAL slow_query_log = 1;
SET GLOBAL query_cache_size = 0;
SET @@GLOBAL.long_query_time = 1;
SHOW STATUS LIKE 'Qcache%';
SET GLOBAL query_cache_size = 1000000;
SHOW VARIABLES LIKE '%cache%';
SHOW VARIABLES LIKE 'have_query_cache';
show status like "Cache_Hits";


******************************************
* MariaDB
******************************************
SHOW VARIABLES LIKE 'have_query_cache';
SHOW VARIABLES LIKE 'query_cache_size';
SET GLOBAL query_cache_size = 1000000;
SHOW VARIABLES LIKE 'query_cache_size';
SHOW STATUS LIKE 'Qcache%';

Comments are closed.