Start with the Performance Schema and sys schema, which MySQL enables and installs by default, and turn on the slow query log with a sensible threshold. For free, self-hosted monitoring with query analytics, Percona PMM is the most complete option and also covers PostgreSQL and MongoDB; if you already run Prometheus, add mysqld_exporter and Grafana. For log analysis, pt-query-digest. Teams that already use Datadog can add Datadog Database Monitoring. Oracle's MySQL Enterprise Monitor reached end of life on 1 January 2025; Oracle points customers to Oracle Enterprise Manager for MySQL, which is only in commercial editions. On RDS, Aurora, Cloud SQL or Azure, start with the provider's console.
MySQL keeps detailed statistics in memory. The Performance Schema instruments statements, stages, waits, memory and I/O; the sys schema turns those tables into readable views such as sys.statement_analysis; and the slow query log writes statements that exceed a time threshold to a file or table. What MySQL does not do by itself is keep long-term history, chart trends or alert you, which is the job of the tools below.
MariaDB differs. MariaDB's documentation states that its Performance Schema is disabled by default and must be enabled at startup with performance_schema=ON; the sys schema is available from MariaDB 10.6 and needs the Performance Schema turned on. Check each tool's MariaDB support separately. For cross-engine choices see the best database monitoring tools and the best open source database monitoring tools; for PostgreSQL see the best PostgreSQL monitoring tools.
Quick picks
Enabled and installed by default in MySQL; every other tool reads from them or from the slow log.
Open source dashboards and Query Analytics for MySQL, MariaDB, PostgreSQL and MongoDB.
Groups similar statements from the slow log and ranks them by total time.
Apache 2.0 exporter from the Prometheus project, including Performance Schema digest metrics.
Query metrics, samples and explain plans alongside APM and infrastructure data.
How we chose
We considered MySQL's built-in instrumentation and logs, open source tools (Percona Monitoring and Management, Prometheus with mysqld_exporter and Grafana, Percona Toolkit's pt-query-digest), Oracle's own monitoring products, Datadog Database Monitoring, and the monitoring features of Amazon RDS and Aurora, Google Cloud SQL and Azure Database for MySQL. To be included, a tool had to be released or sold in October 2026, document what it collects from MySQL, and publish its licence or pricing basis. MySQL Enterprise Monitor is covered in the Oracle entry because it is end of life.
For each tool we recorded what it collects (statement digests, waits, slow log events, plans, OS metrics), deployment, retention where documented, MariaDB support, and the pricing basis. We do not quote overhead figures unless the vendor documents them, and we attribute those that are. The order is not a ranking: built-in features come first, then open source tools, commercial products and cloud consoles.
At a glance
| Tool | Price | Deployment | Collects | MariaDB | Main trade-off |
|---|---|---|---|---|---|
| Performance Schema and sys schema | Free | Part of MySQL | Statement digests, waits, I/O, memory | Yes; Performance Schema off by default, sys from 10.6 | No history, charts or alerts |
| Slow query log with pt-query-digest | Free (GPLv2 or Artistic) | Server log plus command-line tool | Statements over a time threshold | Yes (slow log) | After-the-fact reports only |
| Percona PMM | Free (AGPLv3 server, Apache 2.0 client) | Self-hosted server plus client | Metrics and Query Analytics | Yes | You host PMM Server |
| Prometheus + mysqld_exporter | Free (Apache 2.0) | Self-hosted exporter and Prometheus | Server and digest metrics | Yes (10.3 and later) | Metrics only; no plans or samples |
| Datadog Database Monitoring | Paid, per database host | SaaS with Datadog Agent | Query metrics, samples, explain plans | Yes (separate setup guide) | Per-host cost |
| Oracle Enterprise Manager for MySQL | Paid (commercial editions only) | Enterprise Manager plug-in | 500+ metrics, Query Analyzer | Not stated | Needs Oracle Enterprise Manager |
| CloudWatch Database Insights | Standard mode included; Advanced paid | AWS console | DB load, per-query metrics, slow SQL | RDS for MariaDB | AWS only |
| Cloud SQL Query Insights | No additional cost | Google Cloud console | Query load, plans, waits (Enterprise Plus) | Not applicable | Google Cloud only |
| Azure Query Performance Insight | Workbook free; Log Analytics billed | Azure Monitor workbook | Slow log based top queries | Not applicable | Needs slow log export to Log Analytics |
Performance Schema and sys schema
The MySQL documentation states that the Performance Schema is enabled by default, and that the sys schema is installed by default when a data directory is initialised. The sys schema is a set of views, procedures and functions that make Performance Schema data readable. sys.statement_analysis lists normalised statements with execution counts, errors, full table scans, latency, rows examined and temporary tables, ordered by total latency. This query shows the ten statements with the highest total latency:
-- MySQL (sys schema)
SELECT query, db, exec_count, total_latency, avg_latency,
rows_examined_avg, full_scan
FROM sys.statement_analysis
LIMIT 10;Other useful places to look are performance_schema.events_statements_summary_by_digest (the raw table behind many tools), sys.statements_with_full_table_scans and sys.schema_unused_indexes. Some sys views need extra Performance Schema instruments and consumers; the sys schema provides procedures such as sys.ps_setup_enable_instrument to turn them on, and MySQL notes that enabling everything has a performance impact. For what to do with the results, see the performance tuning and SQL indexes lessons.
- Statistics live in memory and are lost on restart; there is no long-term history.
- No charts or alerting.
- On MariaDB the Performance Schema is off by default and must be enabled at startup.
Slow query log with pt-query-digest
The slow query log is disabled by default. When enabled with slow_query_log, it records statements that run longer than long_query_time (default 10 seconds, settable to microseconds) and examine at least min_examined_row_limit rows, to a file or a table depending on log_output. log_queries_not_using_indexes adds statements that do not use an index. MySQL ships mysqldumpslow to summarise the file.
pt-query-digest, from Percona Toolkit (3.7.1 when checked), goes further: it reads slow, general and binary logs, SHOW PROCESSLIST output or tcpdump captures, groups similar statements and reports which consume the most time. Many managed services let you enable the slow log through parameters and export it to their logging service.
- Reports are produced after the fact, not as live dashboards or alerts.
- A low long_query_time on a busy server produces large logs, so choose the threshold carefully.
- Shows timing and row counts but not execution plans; run EXPLAIN on the statements it surfaces.
Percona Monitoring and Management (PMM)
PMM is Percona's open source monitoring and management platform; the documentation describes PMM 3.9.1 (19 August 2026). PMM Server is AGPLv3 and PMM Client is Apache 2.0. Percona lists support for Percona Server for MySQL, Oracle MySQL Community and Enterprise, MariaDB, Percona XtraDB Cluster and Amazon Aurora, as well as PostgreSQL, MongoDB, ProxySQL and Valkey/Redis.
Query Analytics (QAN) for MySQL reads either the slow query log or the Performance Schema, and dashboards cover server, InnoDB, replication and host metrics. Percona also lists alerting, Advisors checks and backup management. PMM is the most complete free option here, at the cost of running its server yourself.
- You deploy, size and upgrade PMM Server yourself.
- Support is through Percona's paid services or the community.
- Slow-log-based QAN needs log access, which differs on managed services (editorial: check your provider).
Prometheus + mysqld_exporter
mysqld_exporter is maintained by the Prometheus project under Apache 2.0 and supports MySQL 5.6 and later and MariaDB 10.3 and later. The latest release when checked was 0.20.0 (12 August 2026). Besides global status and InnoDB metrics, optional collectors read the Performance Schema, for example perf_schema.eventsstatementssum for summed statement digests, plus waits, file and table I/O and replication.
Prometheus stores the series and evaluates alert rules; Grafana (AGPL-3.0) is the usual dashboard layer. See Prometheus vs Datadog.
- Metrics only: no query samples, execution plans or slow log analysis.
- Dashboards and alert rules are yours to build or import.
- Several Performance Schema collectors are off by default and must be enabled per need.
Datadog Database Monitoring
Datadog Database Monitoring (DBM) adds query metrics, query samples, explain plans and database host views to Datadog. For self-hosted MySQL it documents support for 5.6, 5.7, 8.0 and 9 (9 needs Agent 7.84 or later), and for MariaDB 10.5, 10.6, 10.11, 11.1, 12 and 13 through a separate setup guide. Setup needs Agent 7.36.1 or later, performance_schema on, the events_statements_current and events_waits_current consumers enabled, and max_digest_length raised to 4096 so long queries are captured. Datadog states the Agent typically uses less than 1% of query execution time and CPU.
As listed on Datadog's pricing page on 7 October 2026: USD 70 per database host per month billed annually, or USD 84 month to month or on demand. See Datadog vs New Relic.
- A per-host charge on top of other Datadog products.
- SaaS only; monitoring data leaves your network.
- Needs Performance Schema configuration on every server, some of which requires a restart.
Oracle Enterprise Manager for MySQL
MySQL Enterprise Monitor is end of life. Oracle's notice reads: "MySQL Enterprise Monitor is End of Life (EOL) as of January 1, 2025. Users are encouraged to use Oracle Enterprise Manager for MySQL." Do not start new deployments on it.
Oracle Enterprise Manager for MySQL is a plug-in that extends Oracle Enterprise Manager to MySQL. Oracle lists real-time performance and availability monitoring, over 500 metrics, replication and InnoDB monitoring, Enterprise Firewall and Audit monitoring, threshold alerts, configuration change tracking and performance reports, and states it is "only available in select Commercial Editions". Oracle does not publish a separate price.
- Only in commercial MySQL editions, so not an option for MySQL Community users.
- Requires Oracle Enterprise Manager Cloud Control, which is a significant platform to run if you do not already have it.
- Oracle does not state MariaDB support.
Amazon CloudWatch Database Insights
AWS states that Performance Insights reached end of life on 31 July 2026 and that its users were migrated to CloudWatch Database Insights, which supports Aurora MySQL, RDS for MySQL and RDS for MariaDB among other engines. Standard mode analyses DB load by dimension and keeps 7 days of detailed and per-query metrics at no extra cost, with longer retention paid. Advanced mode adds per-query statistics, slow SQL analysis (which needs database logs exported to CloudWatch Logs), fleet views and 1 to 24 months of retention included.
The execution plan and lock analysis features of Advanced mode are not listed for MySQL engines. Pricing is on the CloudWatch pricing page.
- AWS only.
- Execution plan analysis is not offered for MySQL or MariaDB engines.
- Feature availability varies by AWS Region.
Google Cloud SQL Query Insights
Query Insights shows database load, top queries and query plans for Cloud SQL, at no additional cost. On Cloud SQL for MySQL, Enterprise edition (MySQL 5.7 or later) keeps 7 days of metrics, stores query text up to 4,500 bytes and samples up to 20 plans a minute. Enterprise Plus (MySQL 8.0 or later) keeps 30 days, stores up to 1 MB of query text, samples up to 200 plans a minute, and adds wait event analysis and index recommendations; it is not supported on shared-core machine types.
- Google Cloud only.
- Wait events and index advice need Enterprise Plus.
- Seven days of history on Enterprise edition.
Azure Database for MySQL Query Performance Insight
On Azure Database for MySQL flexible server, Query Performance Insight is an Azure Monitor workbook built on the slow query log. You enable slow_query_log, send the logs to a Log Analytics workspace through diagnostic settings, and the workbook shows top long-running queries and their trends, query text with minimum, maximum, average and standard deviation of query time, and CPU, memory and storage use. You can also query the logs directly with KQL.
- Depends on the slow query log, so it only sees statements above your threshold.
- Log Analytics ingestion and retention are billed under Azure Monitor pricing.
- Azure only.
How to choose
Begin with what is already there: query sys.statement_analysis, enable the slow query log with a threshold that suits your workload, and run pt-query-digest on it. If you need history, dashboards and alerts without a subscription, PMM gives the most in one package; Prometheus with mysqld_exporter fits teams that already run that stack. On MariaDB, enable the Performance Schema first and check each tool's MariaDB support.
On a managed service, try the provider's console before adding anything. Add Datadog or another commercial platform when you need database queries next to application traces (see database monitoring vs APM) or when running your own monitoring stack costs more than a subscription. If you still run MySQL Enterprise Monitor, plan a move, since it no longer receives fixes. Choosing between engines? See MySQL vs PostgreSQL and MariaDB vs MySQL.
Frequently asked questions
Is MySQL Enterprise Monitor still available?
No. Oracle states MySQL Enterprise Monitor reached end of life on 1 January 2025 and encourages users to move to Oracle Enterprise Manager for MySQL, which is only available in select commercial editions.
Is the Performance Schema enabled by default?
In MySQL, yes, and the sys schema is installed by default when the data directory is initialised. In MariaDB, the Performance Schema is disabled by default and must be enabled at startup; the sys schema is available from MariaDB 10.6.
What is the best free MySQL monitoring tool?
Percona PMM is the most complete free option, with dashboards and Query Analytics for MySQL and MariaDB. If you already use Prometheus, mysqld_exporter with Grafana is a lighter choice. For one-off analysis, pt-query-digest on the slow query log is free and widely used.
Can MySQL Workbench monitor MySQL?
MySQL Workbench is a client and administration tool rather than a monitoring system with history and alerts. Its July 2026 release (26.7.0) is a rebuild on MySQL Shell; check its current feature list before relying on it for monitoring. See the MySQL Workbench review.
How do I find slow queries in MySQL?
Query sys.statement_analysis for statements with the highest total latency, or enable the slow query log and summarise it with mysqldumpslow or pt-query-digest. Then use EXPLAIN on the worst statements and check their indexes.
Sources
- MySQL 8.4: Performance Schema quick start
- MySQL 8.4: sys schema
- MySQL 8.4: statement_analysis view
- MySQL 8.4: The slow query log
- MySQL product support EOL announcements
- Oracle Enterprise Manager for MySQL
- MariaDB: Performance Schema overview
- MariaDB: Sys Schema
- Percona Toolkit: pt-query-digest
- Percona Monitoring and Management
- Percona PMM documentation
- Percona PMM repository and licences
- mysqld_exporter (Prometheus)
- Grafana repository and licence
- Datadog: Setting up DBM for self-hosted MySQL
- Datadog pricing list
- Amazon CloudWatch Database Insights
- Google Cloud SQL for MySQL: Query insights
- Azure Database for MySQL: Query Performance Insight
Checked October 2026.
How we research these guides: our editorial method.