tps-transactions per Second (number of things transferred per second), which is the number of transactions per second that the server processes, and a performance metric that is unique to the storage engine that supports transactions such as InnoDB.
Calculation method:
TPS = (com_commit + com_rollback)/uptime
Use Information_schema;select variable_value to @num_com from global_status where variable_name = ' com_commit '; select Variable_value into @num_roll from global_status where variable_name = ' com_rollback ', select Variable_value into @uptime F Rom global_status where variable_name = ' UPTIME '; Select (@[email protected]_roll)/@uptime;
Qps-queries per Second (Query throughput/sec) for both InnoDB and MyISAM engines
Calculation method:
Qps=questions/uptime
Use Information_schema;select variable_value to @num_queries from global_status where variable_name = ' QUESTIONS '; Select Variable_value into @uptime from global_status where variable_name = ' uptime '; select @num_queries/@uptime;
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
About MySQL TPs and QPS