information_schema.global_variables and information_schema.global_status are two useful tables for getting information on the MySQL® server configuration and status. They have been introduced in MySQL® version 5.1.
You know that some status variables are ‘raw’ and they need a little manipulation to bring a kind of useful information. For example, let’s consider the variable BYTES_RECEIVED (i.e. the number of bytes received from all clients).
If you just select that variable you don’t have a useful information, but if you calculate the ratio ‘Bytes Received per Second’
(`BYTES_RECEIVED`) / (`UPTIME`)
you have a more interesting value and you can see how this value is changing over time.
I’ve created a SQL Script that can help you calculate many interesting Hit Ratios and Derived Performance Metrics and I am posting it here so that you can have and idea on what ratios you can calculate to …
[Read more]