umumnya Anda dapat mengakses info itu karena pilih ini:
SELECT
VARIABLE_NAME,
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA.GLOBAL_STATUS
Anda bisa membuat perhitungan yang Anda inginkan seperti ini:
select (g1.VARIABLE_VALUE / (g1.VARIABLE_VALUE + g2.VARIABLE_VALUE + g3.VARIABLE_VALUE)) as result
FROM INFORMATION_SCHEMA.GLOBAL_STATUS g1
inner join INFORMATION_SCHEMA.GLOBAL_STATUS g2
inner join INFORMATION_SCHEMA.GLOBAL_STATUS g3
where g1.VARIABLE_NAME = 'Qcache_hits'
and g2.VARIABLE_NAME = 'Qcache_inserts'
and g3.VARIABLE_NAME = 'Qcache_not_cached'