0

I have a MySQL 5.7 database. I was looking in statistics in server status that shows type of queries / commands / tasks executed in the database. It shows that the query command "change db" by far was the most frequent one.

enter image description here

What does the "change db" value mean in Server > Status > Statistics? I only have one database (except system databases) why is the query running so often, almost twice select?

0

You are probably using a 3rd party package. And it probably does a "USE" at the beginning of every connection, possibly much more often.

The frequency of SHOW commands also smells like a sloppy 3rd package that can't remember what it is working with.

Another possibility is a monitoring package. However, I would expect to see even more SHOWs.

One way to track things down is to turn on the "general log" for a short while, then look at that log to see which "user" is doing what.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.