Overview
Usually to test the performance of some tools, you have to use data to speak. The data can be objectively verified by some things. For example, the performance of some database middleware, for a beginner will only see the surface of the Kua. We have to prove it, then test it with a specific query statement. However, often in the execution of a statement, helplessly looking at the black screen of a class of clients, can not help dozing wandering, statistics also headache.
Method
Open MySQL Client
mysql-h127.0.0.1-uroot-proot-p3306
Select Database
Use dbtest;
Set profiling
Set profiling=1;
Execute SQL statement (there is a large amount of data here)
Select COUNT (*) from test;
Results
Show profiles;+----------+-------------+------------------------------------------------+| query_id | Duration | Query |+----------+-------------+------------------------------------------------ +| 1 | 89.45164725 | Select COUNT (*) from test |+----------+-------------+------------------------------------------------ +
Count the time each SQL statement executes in MySQL