Skip to content
Skip to content
PGB Learn

Query Advisor and performance

Run a schema audit, analyze slow queries, apply suggested indexes and watch database metrics.

Updated Nov 12, 2026

Schema audit

Open Databases > Query Advisor and choose Run Audit. It looks for missing primary keys, unindexed foreign keys, JSONB bottlenecks and sequence exhaustion, and gives a Schema Health Score out of 100 with a grade. Detected Issues lists each with severity (High, Medium, Low) and a Fix with its SQL. Applied fixes appear in Applied Remediation Log and can be rolled back.

Workload query analyzer

Choose Analyze Queries. Slow queries (over 100 ms) are found from query statistics and candidate indexes are tested virtually. Each suggestion shows the table, columns, average time, estimated cost reduction and confidence, with View CREATE INDEX statement, Apply Index and Dismiss. If statistics are unavailable the page shows how to enable pg_stat_statements. See Extensions.

Metrics

DB Metrics & Spikes shows disk size, compute use, cache hit ratio, transactions, a load chart (1 hour to 30 days), detected spikes, active sessions and table sizes.

Good to know

  • Review SQL before applying; indexes use disk and slow writes slightly.
  • A cache hit ratio below about 99% on a busy database may mean it needs attention.
  • Compute is billed by active query time. See Usage and the free allowance.

More guides in Console: databases