Index advisor overview

This page describes the Cloud SQL for PostgreSQL index advisor.

Cloud SQL for PostgreSQL offers a fully managed index advisor that tracks the queries your database handles regularly. Periodically, the index advisor analyzes these queries to recommend new indexes that can improve query performance. Enabling the index advisor lets you detect and fix performance issues with systems and queries.

How does the index advisor work?

Index advisor helps you improve query processing by doing the following:

  • Help you identify a set of indexes with SQL commands to create indexes.
  • Provide data to help you evaluate recommended indexes, for example, estimated storage size and impact of indexes on a query.
The index advisor stores and displays the CREATE INDEX command containing the database name, schema name, table name, and column names. The tracked queries are all normalized queries with all literals removed.

Index recommendations are encrypted at rest. For more information about how to use the index advisor, see Use index advisor. For more information on how to use index advisor with Query Insights, see Use index advisor with Query Insights.

Limitations

Cloud SQL for PostgreSQL index advisor has the following limitations:

  • The index advisor provides CREATE INDEX recommendations only.
  • The index advisor is only supported by Cloud SQL for PostgreSQL versions 12.0 or later.
  • Enabling the index advisor requires you to restart your instance.