Database Management
Missing statistics for SQL statements when DPA is monitoring a MySQL database instance
DPA is monitoring a MySQL database instance and you don't see statistics for SQL statements.
First published date
Last published date
Overview
If DPA is monitoring a MySQL database instance and you don't see statistics for SQL statements, use the following information to resolve the issue.
Product section
Cause
There are some common reasons for why SQL data can be missing:
- The MySQL performance schema is disabled.
- MySQL does not provide statistics for SQL run in a stored procedure.
- MySQL does not provide statistics for SQL run from a prepared statement.
- SQL has been executed in batches.
If none of these reasons apply, SolarWinds DPA might not be getting a sufficient quantity of statement history from your MySQL instance to collate SQL statistics. We can extend the amount of statement history available by enabling a MySQL option from within SolarWinds DPA.
Resolution
Verify that the MySQL performance schema is enabled, and that the SQL is not run in a stored procedure, a prepared statement, or batches.
If none of those reasons apply, extend the amount of statement history available, by enabling the MySQL events_statements_history_long table. You can enable this table for all monitored database instances or for just a single database instance.
Enabling events_statements_history_long for all instances
- Log in to the SolarWinds DPA web console as an administrator.
- Go to the page Options > Administration > Advanced Options > System Options.
- Click one of the following:
- DPA 2024.4 and later: MYSQL_OR_MARIADB_ENABLE_HISTORY_LONG
- Earlier versions: MYSQL_ENABLE_HISTORY_LONG
- From the New Value list, select Enable.
- Click Update.
Enabling events_statements_history_long for a single instance
- Log in to the SolarWinds DPA web console as an administrator.
- Go to the page Options > Administration > Advanced Options > DB Instance Options.
- Select a database instance from the list.
- Click one of the following:
- DPA 2024.4 and later: MYSQL_OR_MARIADB_ENABLE_HISTORY_LONG
- Earlier versions: MYSQL_ENABLE_HISTORY_LONG
- From the New Value list, select Enable.
- Click Update.