This page is for DBAs, developers and engineering leads who need to make specific queries or workloads faster, rather than watch general server health. It starts with what the database already gives you: Query Store in SQL Server and Azure SQL, the pg_stat_statements extension in PostgreSQL and Oracle SQL Tuning Advisor. It then lists the performance monitors that build history, plan analysis and alerting on top of those sources. These are cross-listed from the Database Monitoring category of our SQL tools directory: SolarWinds SQL Sentry, SolarWinds DPA, Redgate Monitor, Idera SQL Diagnostic Manager, pganalyze, Percona Monitoring and Management and Datadog Database Monitoring, plus the SQL Server SaaS monitor SQLGrease. SQL Prompt represents tools that improve SQL before it ships.
Several names in this space have changed status, and their listings are kept so buyers can see what happened. EverSQL was acquired by Aiven in 2023 and its engine is now the Aiven AI Database Optimizer, with a free standalone SQL Query Optimizer. OtterTune, the machine-learning tuning service, shut down in 2024. MySQL Enterprise Monitor reached end of life on 1 January 2025, and Oracle points its users to Oracle Enterprise Manager for MySQL.
What this software does
Query tuning follows a loop: find the statements that cost the most, explain why, fix them and verify the result. Finding starts with statement-level statistics grouped by normalised query text, so the same query with different literal values counts as one. pg_stat_statements keeps cumulative counters for every normalised statement; Query Store keeps per-database history of queries, plans, runtime statistics and (from SQL Server 2017) wait categories, and survives restarts unlike the plan cache. Ranking by total time usually matters more than by single slowest execution, because a 5 ms query run a million times can outweigh one slow report.
Explaining a query means reading its execution plan (how the optimizer chose to join, scan and sort) and its waits (what it spent time waiting on: I/O, locks, CPU, memory grants). Wait-time analysis is the core of tools such as SolarWinds DPA, while pganalyze collects plans through PostgreSQL auto_explain, since pg_stat_statements stores no plans. Blocking and deadlocks, such as SQL Server error 1205, are diagnosed from lock and session data rather than plans.
Fixes include adding or changing indexes, rewriting SQL, refreshing statistics and, when a good plan regresses, pinning it: SQL Server lets you force a plan or apply Query Store hints from SQL Server 2022, and Oracle SQL Tuning Advisor can recommend SQL profiles that change a plan without changing application code. Configuration tuning (memory, parallelism, autovacuum and other server settings) is a separate lever; OtterTune tried to automate it with machine learning before shutting down. Monitors then show whether the change helped and alert when a regression returns.
Types of product in this category
- Query optimization service: Services that analyse queries or configuration and recommend changes; this segment now holds only the historical EverSQL (now inside Aiven as the AI Database Optimizer) and OtterTune (shut down in 2024).
- Monitoring and diagnostics: Performance monitors that collect query statistics, plans, waits and blocking over time and alert on problems, from SQL Server tools (SQL Sentry, Idera SQL DM, SQLGrease) to multi-engine and PostgreSQL tools (DPA, Redgate Monitor, pganalyze, PMM, Datadog); MySQL Enterprise Monitor is listed as end of life.
- Built-in database feature: Statistics sources and advisors that ship with the database engine, such as Query Store, pg_stat_statements and Oracle SQL Tuning Advisor, which most third-party monitors read from.
- Development tool: Editor add-ins that help write better SQL before it reaches production, such as SQL Prompt for SSMS and Visual Studio with code analysis and formatting; they do not monitor running workloads.
Typical use cases
Plan regression after an upgrade or statistics change
A query that ran in milliseconds suddenly takes seconds. Query Store's Regressed Queries report shows the old and new plans, and you can force the previous plan while you fix the root cause.
Finding the top resource consumers before buying hardware
Rank statements by total CPU, I/O or duration with pg_stat_statements, Query Store or a monitor before scaling up a server or a cloud tier. Often a handful of statements account for most of the load.
Index tuning
Identify missing, unused and duplicate indexes. pganalyze adds index advice for PostgreSQL, Oracle SQL Tuning Advisor recommends indexes or SQL Access Advisor runs, and the Aiven optimizer that grew out of EverSQL suggests indexes and rewrites for PostgreSQL and MySQL.
Blocking and deadlock investigation
Capture the sessions, statements and locks involved when users report timeouts or deadlock errors such as SQL Server 1205 and 1222. SQL Sentry, SQLGrease and Idera SQL DM record blocking and deadlock detail for SQL Server.
Reviewing SQL before it ships
Catch problems such as non-sargable predicates or missing WHERE clauses during development with code analysis in SQL Prompt or in code review, which costs less than finding them in production.
Cutting cloud database cost
On managed databases, expensive queries drive the instance size and I/O charges. Reducing their cost can let you move to a smaller tier; measure before and after with the same statistics source.
How to choose
- Engine coverage. Most tools are deep on one engine. SQL Sentry, Idera SQL DM, SQLGrease and SQL Prompt cover only the SQL Server family; pganalyze is PostgreSQL only; PMM covers MySQL, PostgreSQL and MongoDB but not SQL Server or Oracle; DPA and Datadog cover several commercial and open source engines. Match the tool to the engines that carry your critical workloads.
- Depth of query data. Check whether the tool records normalised statements, full plan history, per-query waits and parameter values, or only top-N snapshots. pg_stat_statements has counters but no plans or history; Query Store has plans and waits per database; SQLGrease records per-query waits, plans and tempdb use.
- History and retention. Regressions are found by comparing with the past, so retention matters. pganalyze ties retention to the plan (14 days on Production), Datadog keeps query metrics for 15 months but samples for 15 days, and self-hosted tools keep whatever your repository can hold.
- Recommendations versus automation. Decide how much the tool should change for you. Most tools here only advise. Oracle SQL Tuning Advisor can run as a nightly automatic task and accept SQL profiles automatically; Query Store supports manual plan forcing, while automatic plan correction is a separate feature (Enterprise in SQL Server 2025); SQLGrease generates plan-forcing commands for you to run.
- Overhead, permissions and setup. Check what must be installed and granted. pg_stat_statements needs shared_preload_libraries and a server restart; Query Store needs size and capture settings on busy databases and is off by default on SQL Server 2016 to 2019; SQLGrease needs VIEW SERVER STATE for most features; agentless monitors such as SQL Sentry and DPA still need a monitoring server and repository.
- Deployment and data residency. SaaS monitors (Datadog, SQLGrease, pganalyze SaaS) send query text and statistics to the vendor; self-hosted tools (SQL Sentry, DPA, Idera SQL DM, PMM, Redgate Monitor self-hosted, pganalyze Enterprise Server) keep it in your network. Query text can contain personal data, so check masking options.
- Licensing of built-in features. Built-in does not always mean free. Query Store is included in all SQL Server 2025 editions, including Express, and pg_stat_statements is free; Oracle SQL Tuning Advisor needs the Tuning Pack and Diagnostics Pack on Enterprise Edition and is not available on Standard Edition 2.
- Vendor and product lifecycle. Confirm the product is still sold and supported. OtterTune shut down in 2024, EverSQL is now part of Aiven and continuous analysis is documented only for databases hosted on Aiven, and MySQL Enterprise Monitor reached end of life on 1 January 2025.
- Fit with existing monitoring. If you already run an observability platform or DBA monitor, check whether its database module covers query-level tuning before adding another tool, and whether it reads Query Store or pg_stat_statements so the numbers match what DBAs see in the engine.