PostgresAI vs Cloud SQL Query Insights
any provider vs inside Cloud SQL
Cloud SQL Query Insights shows query load, plans and index advice inside Cloud SQL at no extra cost. PostgresAI runs checkups on any provider and files Issues with a fix.
Where PostgresAI is ahead of Cloud SQL Query Insights
Each point pairs what our documentation says with what the Cloud SQL Query Insights documentation says. Follow the links and check.
The same checks wherever Postgres runs
PostgresAIAmazon RDS and Aurora, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Tiger Data, self-managed servers and Postgres running on Kubernetes. docs
13 months of history
PostgresAIScale keeps 13 months of history. docs
Cloud SQL Query InsightsQuery Insights keeps query metrics for 7 days on Enterprise edition and 30 days on Enterprise Plus, where the data sits on the instance disk: about 155 GB for 30 days. 1
Test the fix on a full-size copy first
PostgresAIWith DBLab Engine, a separate open-source product, an index or query change runs on a full-size thin clone of the database, created in seconds, before it reaches production. docsdocs 2
Cloud SQL Query InsightsDatabase Center assessments, in Preview, test machine type, edition or data cache changes on a clone that uses synthetic pgbench data. The sources we reviewed do not describe testing an index or query change on a copy of your data. 6
Open source, no licence fee to self-host
Short answer
Query Insights is built into Cloud SQL for PostgreSQL at no additional cost: query load, top queries, sampled plans and application tags, with wait events, index advisor and 30-day retention on Enterprise Plus. PostgresAI monitoring supports Google Cloud SQL and runs alongside it, adding scheduled checkups, Issues for you or your AI agent, 13-month history on Scale and human experts. Query Insights comes with every Cloud SQL instance; add PostgresAI if you want the same checks across providers, longer history or expert help.
When Cloud SQL Query Insights is the better choice
- No additional cost: Query Insights is included on both Cloud SQL Enterprise and Enterprise Plus instances, with nothing to install.
- With Enterprise Plus features turned on, it captures wait events and query plans for all executed queries, samples up to 200 plans per minute and keeps metrics for 30 days.
- The managed index advisor tracks your workload and shows CREATE INDEX recommendations with estimated impact in the Query Insights dashboard (Enterprise Plus).
- AI-assisted troubleshooting, in Preview on Enterprise Plus, helps troubleshoot slow queries and high database load with evidence and recommendations; Gemini Cloud Assist investigations need a Premium Support contract.
- A Database Insights remote MCP server gives agents such as Gemini CLI and Claude Code query and system metrics for Cloud SQL for PostgreSQL.

What you get
Checkup findings as Issues in the PostgresAI Console. How it works
PostgresAI and Cloud SQL Query Insights, side by side
| Question | PostgresAI | Cloud SQL Query Insights |
|---|---|---|
| What it is | PostgreSQL monitoring with scheduled health checkups. Findings become Issues with severity, evidence and a recommended fix, which you, your AI agent or a PostgresAI expert can act on. docsdocs 2 | A Cloud SQL feature to detect, diagnose and prevent query performance problems: query load, top queries, sampled query plans, application tags that trace a query by model, view, controller, route, user and host, and active queries. Enterprise Plus adds wait events, the index advisor and AI-assisted troubleshooting (Preview). 13 |
| Where your Postgres can run, and which versions | YesAmazon RDS and Aurora, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Tiger Data, self-managed servers and Postgres running on Kubernetes. PostgreSQL 14 and newer, with the pg_stat_statements extension. docs | NoBuilt into Cloud SQL for PostgreSQL, which supports PostgreSQL 9.6 to 18; versions past community end of life are charged for extended support. Query Insights monitors Cloud SQL instances in your Google Cloud project. Gemini in Database Center also covers AlloyDB for PostgreSQL. 1117 |
| Where it runs and what it collects | YesHosted by PostgresAI, or self-hosted in your own cloud account or on your own server. It collects database metadata such as statistics, normalized query texts and wait events, not table data or query parameters. docsdocs 2 | NoPart of Cloud SQL, which Google describes as "a fully managed relational database service". Query insights is viewed in the Google Cloud console. For Cloud SQL Enterprise edition, its metrics are stored in Cloud Monitoring. 101 |
| Open source | YesThe monitoring software is open source under Apache 2.0. Hosted plans are a separate paid service. docsdocs 2 | Does not applyDoes not apply: Query Insights is a feature of Cloud SQL, a Google Cloud service. 1 |
| Query performance analysis | YesTop queries from pg_stat_statements by calls, execution time, planning time and rows, with a drill-down dashboard for a single query. For execution plans, Joe runs EXPLAIN on a DBLab clone. docsdocs 2 | YesTop queries by load, per-query load and sampled plans broken into operations. Enterprise edition samples up to 20 plans per minute and keeps query text up to 4500 bytes (1024 by default); Enterprise Plus captures plans for all queries, up to 200 samples per minute. 13 |
| Wait event analysis | YesAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docs | PartlyOn Enterprise Plus only: wait events captured for all executed queries, and database load filtered by wait event type. The Enterprise edition list does not include wait event analysis. 13 |
| Health checks and recommendations | YesScheduled checkup reports on settings, autovacuum and bloat, and indexes (invalid, unused, redundant). Each finding becomes an Issue with severity, evidence and a specific fix. docsdocs 2 | YesThe index advisor recommends CREATE INDEX commands with estimated impact; it needs Enterprise Plus and does not support read replicas. Gemini in Database Center lists inefficient queries and index advisor findings across the fleet. 27 |
| AI and agent access | YesThe postgresai CLI (alias pgai) and an MCP server with tools for Issues, action items and checkup reports. The setup guide covers Cursor, Claude Code, Windsurf and Codex. docsdocs 2 | YesThe Database Insights remote MCP server at databaseinsights.googleapis.com/mcp offers tools such as get_query_metrics and get_system_metrics. The guide names Gemini CLI, Gemini Code Assist agent mode and Claude Code as clients. 4 |
| Testing a fix before production | YesWith DBLab Engine, a separate open-source product: a full-size thin clone of the database in seconds, where an index or query change can be run on real data. DBLab is set up and priced separately. docsdocs 2 | PreviewDatabase Center assessments, in Preview, apply a machine type, edition or data cache recommendation to a clone with synthetic pgbench data and compare benchmarks. The sources we reviewed do not describe testing an index or query change on a copy of your data. 6 |
| Human PostgreSQL experts | YesScale includes two expert requests a month, answered within 24 business hours. Either plan can buy a one-off pack of two requests for $500. Consulting is separate. docsdocs 2 | PartlyGoogle Cloud support contracts. From April 10, 2026, running Gemini Cloud Assist investigations requires a Premium Support contract. The sources we reviewed do not describe PostgreSQL consulting. 5 |
| Alerts | Email and Slack alerts on Starter and Scale. docs | Through Cloud Monitoring alerting policies, created in the console, API, gcloud or Terraform. The Cloud SQL integration package includes recommended policies for failed instances and slow transactions; the example sends email and Slack messages. 8 |
| History kept | 14 days on Starter, 13 months on Scale, custom on Enterprise. docs | Query metrics are kept for 7 days on Enterprise edition and 30 days on Enterprise Plus. 13 |
| Security attestations | SOC 2 Type 2 examination completed for the Security and Availability criteria, covering March 4 to June 4, 2026. The SOC 3 report is public. docs | Cloud SQL is listed among the Google Cloud services in scope for SOC 2. Google Cloud issues SOC 2 Type II reports, quarterly, through Compliance Reports Manager. 9 |
Pricing
| Product | Plan | List price | Notes |
|---|---|---|---|
| PostgresAI | Starter | $16 per cluster/month | Primary only, 14-day retention, no expert requests included |
| PostgresAI | Scale | $512 per cluster/month | Primary and up to 5 replicas in one cluster, 13-month retention, Grafana dashboards, 2 expert requests a month |
| PostgresAI | Enterprise | Custom | Contact sales |
| PostgresAI | Self-hosted | No licence fee | Open source under Apache 2.0; you run it yourself |
| Cloud SQL Query Insights | Enterprise edition | Included | No additional cost for Query Insights; 7-day retention, up to 20 plan samples per minute; metrics stored in Cloud Monitoring; you pay for the Cloud SQL instance 13 |
| Cloud SQL Query Insights | Enterprise Plus edition | Included | No additional cost for Query Insights; 30-day retention, wait events, index advisor, up to 200 plan samples per minute; data stored on the instance disk (about 36 GB for 7 days, 155 GB for 30 days) 13 |
List prices on 18 Nov 2026. The billing units differ, so this is not a total-cost comparison. Cloud SQL editions are priced differently; see the Cloud SQL pricing page. Enterprise Plus Query Insights data uses instance storage and needs automatic storage increases on. As of April 10, 2026, Gemini Cloud Assist investigations require a Premium Support contract. PostgresAI pricing
Using PostgresAI with Cloud SQL Query Insights
PostgresAI monitoring supports Google Cloud SQL, so it can run on the same instances while Query Insights stays on in the console. PostgresAI adds scheduled checkups, Issues and longer history; DBLab can copy a Cloud SQL database with dump and restore for testing a fix.
Questions
- What does Cloud SQL Query Insights cost?
- Google states there is no additional cost for Query Insights on Cloud SQL Enterprise or Enterprise Plus instances. Features such as wait events, the index advisor and 30-day retention come with the Enterprise Plus edition. 13
- How long does Query Insights keep data?
- 7 days on Cloud SQL Enterprise edition and 30 days on Enterprise Plus. PostgresAI keeps 14 days on Starter and 13 months on Scale. 1
- Does Cloud SQL have an index advisor?
- Yes, on Enterprise Plus. It tracks the queries your database runs, periodically recommends new indexes and shows them in the Query Insights dashboard and in the google_db_advisor_recommended_indexes view. Enterprise edition and read replicas are not supported. 2
- Can I use PostgresAI and Cloud SQL Query Insights together?
- Yes. PostgresAI monitoring supports Google Cloud SQL, and Query Insights stays available in the console. PostgresAI adds scheduled checkups, Issues for your AI agent and expert help. 1
Check it on your own database
The express checkup works with PostgreSQL 14 or newer. With --no-upload it needs no account and sends no report data to PostgresAI. It needs Node.js 18 or newer and a database role with pg_monitor. Compare what it finds with what your current tool shows for the same database.
Sources
- Cloud SQL for PostgreSQL: use query insights
- Cloud SQL for PostgreSQL: use index advisor
- Cloud SQL for PostgreSQL: Cloud SQL editions overview
- Cloud SQL for PostgreSQL: use the Database Insights MCP server
- Cloud SQL for PostgreSQL: monitor and troubleshoot with AI assistance
- Assess recommendations for Cloud SQL in Database Center
- Database Center: learn database products using Gemini
- Cloud Monitoring: alerting overview
- Google Cloud SOC 2 compliance
- Cloud SQL for PostgreSQL: Cloud SQL overview
- Cloud SQL for PostgreSQL: Database versions and version policies
These pages compare what each product does for PostgreSQL; other databases and the rest of the stack are out of scope. What we say about the other product comes from its own documentation, pricing page, changelog or source repository, read on the date shown; each row cites its source. "Not documented" means we did not find it in those sources, not that the product cannot do it. Prices are list prices and the billing units differ, so they are not a total-cost comparison. Product names are trademarks of their owners. Found a mistake? Tell us and we will correct the page.
More comparisons
- Amazon DevOps Guru for RDSany cloud vs ML on RDS (closing)
- Azure PostgreSQL built-in toolsany provider vs Azure only
- CloudWatch Database Insightsany provider vs built into AWS
- Supabase advisorshistory and wait events vs built-in lints
- Tiger Data Insightsany provider vs built into Tiger Cloud
- CorootPostgres experts and history vs eBPF query capture
- Datadog Database Monitoringopen source vs traced queries
- Datasentinelopen source with fixes vs session and plan data
- All comparisons