Question
How to check what website causes MySQL/MariaDB to use resources?
How to detect domains, that use a lot of MySQL/MariaDB resources?
Answer
In order to do it, following methods can be useful:
-
MySQL/MariaDB
slow_query_log
option:
Slow query log saves information about all queries that execute longer than specified in the settings of the server. It can be enabled as per the following article: How to enable the MySQL slow query log? -
MySQL/MariaDB third-party profiler:
Third-party profilers analyze all queries executed on the SQL server, check their execution time and log this information for further use. An example of such profilers is Jet Profiler, or Neor Profile SQL.Warning: Plesk was not tested with MySQL/MariaDB profilers, and may not work as expected.