通常、この選択により、その情報にアクセスできます:
SELECT
VARIABLE_NAME,
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA.GLOBAL_STATUS
次のように計算できます:
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'