'Is there any method or query by which we can capture resource usage for running query in MySQL server

any query / method by which we can capture the resource usage for running query or stored procedure? Can anyone help me with this please !?



Solution 1:[1]

There are some queries that you can use to help you monitor this, such as:

View Running Queries:

mysql> SHOW PROCESSLIST;

View the MySQL server status variables which will give you statistical performance data:

mysql> SHOW SERVER STATUS;

Also, you can show an engine's status:

mysql> SHOW ENGINE INNODB STATUS;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andrew