Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to calculate or see the performance of my database in mysql?

I want to check the performance of my database in mysql. I googled and came to know about show full processlist etc commands, but not very clear. i just want to know and calaculate the performance of database in terms of how much heap memory it is taking and other such.

Is there any way to know and assess the performance of the database. so that I can optimize and improve the performance.

Thanks in advance

like image 840
Chella Avatar asked Nov 12 '22 15:11

Chella


1 Answers

The basic tool is MySQL Workbench which will work with any recent version of MySQL. It's not as powerful as the enterprise version, but is a great place to start.

The configuration can be exposed with SHOW VARIABLES and the current state of the system is exposed through SHOW STATUS. These status numbers are what ends up being graphed in most tools.

Don't forget that you can do a lot of monitoring on the application side, turning on database logs for instance. Barring that you can enable the "slow query" log in MySQL to check which queries are having the most impact. These can then be diagnosed with EXPLAIN.

like image 84
tadman Avatar answered Nov 15 '22 05:11

tadman