The number of all queries since the start of the MySQL server

How do I know how many queries have been executed since the MySQL server started?

+1


a source to share


4 answers


mysqladmin proc stat

      

This should give you the number of questions (among other information), which is the number of requests made by the server.



One handy piece of information returned is the slow request count. Hope it's 0. :)

+1


a source


If you want to do this in a request, instead of running an external program:



SHOW GLOBAL STATUS LIKE 'Questions';

      

+2


a source


In MySQL 5.1.31 or newer, you can do show status

and check a line named "Queries"

http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html#statvar_Queries

If you don't have 5.1, use the "Questions" line. In 5.1 it will not include queries inside stored procedures.

http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html#statvar_Questions

0


a source


Just Status mysqladmin -p

should provide you with useful information and specific information.

0


a source







All Articles