Skip to content
Home › SQL Tools › Performance & Query Optimization
Software category

Database Performance and Query Optimization Tools

Tools and built-in database features for finding slow SQL, understanding why it is slow and fixing it: engine features such as Query Store and pg_stat_statements, performance monitors with plan and wait analysis, query optimization services and SQL development aids.

15 listings 7 comparisons Research-based
Last verified November 2026. Listings are research-based profiles built from official vendor and project documentation; no vendor paid for inclusion and the order is alphabetical, not a ranking.

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.

All performance & query optimization listings

Datadog Database Monitoring

Query metrics, samples and explain plans for eight engines inside Datadog, from $70 per database host per month.

SaaS (Datadog Agent)
Monitoring and diagnostics · Also in Database Monitoring
Freemium Historical SaaS

EverSQL

Historical: AI SQL optimizer for PostgreSQL and MySQL, acquired by Aiven in 2023 and now the Aiven AI Database Optimizer.

SaaS (now part of Aiven)
Query optimization service

Idera SQL Diagnostic Manager

Agentless SQL Server monitoring with adaptive baselines, wait stats and deadlock capture, from $1,247 per instance.

Self-hosted (Windows)
Monitoring and diagnostics · Also in Database Monitoring
Discontinued software

MySQL Enterprise Monitor

Historical: Oracle's MySQL monitor with Query Analyzer and advisors; end of life since 1 January 2025.

Self-hosted (discontinued)
Monitoring and diagnostics
Built-in feature

Oracle SQL Tuning Advisor

Built-in Oracle advisor for high-load SQL: SQL profiles, indexes and rewrites; needs Tuning and Diagnostics Packs.

Oracle Database
Built-in database feature
Free Discontinued service

OtterTune

Historical: machine-learning database knob tuning service from CMU research; the company shut down in 2024.

Discontinued SaaS
Query optimization service
Free

Percona Monitoring and Management (PMM)

Free open source monitoring and query analytics for MySQL, PostgreSQL, MongoDB and Valkey or Redis.

Self-hosted (Docker, Kubernetes, VM)
Monitoring and diagnostics · Also in Database Monitoring
Free PostgreSQL extension

pg_stat_statements

PostgreSQL contrib extension that tracks planning and execution statistics for every normalised SQL statement.

PostgreSQL
Built-in database feature

pganalyze

PostgreSQL-only monitoring with query, index and VACUUM advice, as SaaS or a self-hosted Enterprise Server.

SaaS, self-hosted Enterprise
Monitoring and diagnostics · Also in Database Monitoring
Free Built-in feature

Query Store

Built-in SQL Server and Azure SQL query history with plans, waits, plan forcing and Query Store hints.

SQL Server, Azure SQL
Built-in database feature

Redgate Monitor

Multi-engine database monitor, strongest on SQL Server, self-hosted (agentless) or SaaS, per-server subscription.

Self-hosted or SaaS
Monitoring and diagnostics · Also in Database Monitoring

SolarWinds Database Performance Analyzer

Agentless wait-time analysis for Oracle, SQL Server, PostgreSQL, MySQL, MariaDB, Db2, SAP HANA and SAP ASE.

Self-hosted (Windows or Linux)
Monitoring and diagnostics · Also in Database Monitoring

SolarWinds SQL Sentry

Agentless SQL Server, Azure SQL and SSAS performance monitoring with deadlock, blocking and TempDB analysis.

Self-hosted (Windows)
Monitoring and diagnostics · Also in Database Monitoring
Commercial add-in

SQL Prompt

Redgate add-in for SSMS and Visual Studio: T-SQL completion, formatting, code analysis and opt-in Prompt AI.

Windows (SSMS, Visual Studio)
Development tool
SaaS monitoring service

SQLGrease

Hosted SQL Server query-level monitoring: waits, plans, blocking and deadlocks, with published prices from $79 a month.

SaaS, Windows collector
Monitoring and diagnostics
No listings match this filter.

Comparisons

Alternatives and buyer guides

Related reading on CodeWithSQL

Frequently asked questions

What is the difference between database monitoring and query optimization tools?

Monitoring tools watch the health of servers and workloads over time and alert on problems. Query optimization focuses on individual statements: finding the expensive ones, reading their plans and waits, and changing indexes, SQL or plans. Many monitors, such as SQL Sentry, DPA, pganalyze and Datadog Database Monitoring, do both, which is why they are listed in both categories.

Do I need a paid tool if I have Query Store or pg_stat_statements?

Not always. Query Store and pg_stat_statements are free and give the core statement statistics; Query Store also keeps plans and lets you force them. What they lack is an estate-wide view, long history (pg_stat_statements has only cumulative counters), alert routing and guided analysis. Paid tools add those, and most of them read these same built-in sources.

What happened to EverSQL?

Aiven acquired EverSQL in November 2023 and launched its engine as the Aiven AI Database Optimizer in May 2024. It is available as AI insights inside Aiven for PostgreSQL and Aiven for MySQL, and as a standalone SQL Query Optimizer that Aiven calls free during Early Availability. The eversql.com site no longer publishes plans.

Is OtterTune still available?

No. OtterTune the company shut down in 2024 and its repositories are archived. The research code remains public under Apache 2.0, which makes it useful for studying machine-learning configuration tuning, but there is no service or support to buy.

What replaced MySQL Enterprise Monitor?

MySQL Enterprise Monitor reached end of life on 1 January 2025, and Oracle encourages users to move to Oracle Enterprise Manager for MySQL. Other options for MySQL query analysis include Percona Monitoring and Management, SolarWinds DPA, Redgate Monitor and Datadog Database Monitoring.

Does Oracle SQL Tuning Advisor cost extra?

On Oracle Database Enterprise Edition it is licensed through the Oracle Tuning Pack, which also requires the Diagnostics Pack; both are extra-cost options on premises. It is not available on Standard Edition 2. Some Oracle cloud tiers and Oracle Database Free include it.

How we research listings: our editorial method. Other categories: the full SQL tools directory.

Compare before you choose

See the head to head comparisons or browse every category in the tools directory.