tags:

views:

44

answers:

4

How do you find out how many queries have been executed since the MySQL server has started?

+1  A: 
mysqladmin proc stat

This should give you a Questions count (among other information), which is the number of queries asked of the server.

One handy part of the info returned is slow queries count. Hopefully that is 0. :)

Joe
A: 

In MySQL 5.1.31 or later, you can do show status and check out the row with the name "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" row. In 5.1, it won't include queries inside saved procedures.

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

Plutor
+1  A: 

If you want to do it in a query, instead of by running an external program:

SHOW GLOBAL STATUS LIKE 'Questions';
Chad Birch
A: 

Just mysqladmin status -p

should give you the useful information and specific information.