Find the Best Indexes Automatically
Stop guessing which indexes to add. The pganalyze Index Advisor evaluates your entire query workload across all tables and recommends the optimal set of indexes, powered by the pganalyze Indexing Engine.
Surface performance improvement opportunities without manual EXPLAIN analysis or trial and error.


Reduce Query Latency and Database Load
See exactly how each recommended index reduces scan cost and improves query performance, with detailed insights into scan expressions and estimated cost improvements per table.
Spend less time diagnosing slow queries and more time shipping features.
Go From Insight to Action in Seconds
Every recommendation comes with a ready-to-use CREATE INDEX command you can copy directly into your database.
Already using the optimal set of indexes? Index Advisor confirms it, so you can move on with confidence.


Cluster-Aware Insights
Reconcile recommendations per server and across a cluster. Index Advisor combines workloads across your primary and all read replicas for accurate recommendations based on your architecture.
Unused indexes are only flagged when not used on any server in the cluster, protecting indexes that are critical to queries on a replica. See how cluster-aware indexing works→
Try Index Advisor Free, Right in Your Browser
Curious what Index Advisor can do? Paste any query and schema to instantly see whether your indexes are effective, or understand why the planner is ignoring them -- no account or setup required. Try the free standalone Index Advisor→

Hundreds Of Companies Monitor Their Production PostgreSQL Databases With pganalyze
Frequently asked questions
Does pganalyze use AI or machine learning for its recommendations?
No. The pganalyze Index Advisor, Query Advisor, and VACUUM Advisor use deterministic, rule-based analysis built on Postgres planner logic and a constraint programming solver, so the same input always produces the same recommendation, and each one shows its reasoning. Nothing is applied automatically; you review and run every change. The pganalyze MCP Server is the AI-facing part: it lets Claude Code, Codex, or Cursor read those results.
Does pganalyze have access to the data in my database?
No. The pganalyze collector connects with a monitoring role that can only read system statistics and metadata, so it cannot query the rows in your tables or modify your database. The collector is open source, makes only outbound connections, and does not listen on any ports. Run pganalyze-collector --dry-run to see everything it would send. Note that when using pganalyze Log Insights the collector will also capture log events, some of which might contain sensitive data. This data can be filtered with the PII filtering options.
Does pganalyze require pg_stat_statements, and does enabling it need a restart?
Yes. pganalyze reads query statistics from pg_stat_statements, which ships with Postgres. It must be listed in shared_preload_libraries, and changing that setting needs one database restart. Managed providers expose it as a parameter, and many providers such as Amazon RDS/Aurora and Supabase enable it by default.
How long after setup does pganalyze show data?
The pganalyze dashboard shows query statistics and metrics within about 15 minutes of the collector's first snapshot. Index Advisor insights appear within 48 hours, once it has seen a representative workload, and VACUUM Advisor insights within about 24 hours when auto_explain is enabled and problematic plans get captured.
How does the pganalyze Index Advisor decide which indexes to recommend?
The pganalyze Index Advisor looks at every query on a table, not one query at a time, and models how Postgres would use each candidate index with planner logic and a constraint programming solver. It weighs the read time an index saves against the write overhead it adds, so it can avoid an index that speeds up one query but slows down the table writes significantly. Recommendations appear within 48 hours and include the reasoning; nothing is created automatically.
Does pganalyze create indexes automatically?
No. The pganalyze Index Advisor recommends indexes and shows the expected impact; you review and run the CREATE INDEX yourself, or implement the recommendation through a database migration. pganalyze never runs DDL against your database, and the collector's monitoring role could not do so anyway.
What does the pganalyze Query Advisor do?
The pganalyze Query Advisor analyzes the EXPLAIN plans pganalyze collects, from auto_explain or from plans uploaded to a Workbook, and flags optimization opportunities with a suggested fix: inefficient nested loops, the wrong index chosen because of ORDER BY, inefficient index use, late join filters with OR, and disk spills from a low work_mem. Suggestions are query rewrites and planner hints that you can benchmark in Workbooks before changing production; the algorithms are deterministic, built on Postgres planner behavior. Query Advisor is on the Scale and Enterprise plans.


