To detect potential query performance bottlenecks and optimize index creation,
you can use the fully managed index advisor in AlloyDB for PostgreSQL. The index
advisor tracks the queries that your database regularly handles and periodically
analyzes those queries to recommend indexes that can improve query performance.

## How does the index advisor work?

The AlloyDB index advisor helps you improve query processing by
doing the following:

- Helping you identify a set of indexes.
- Providing details to help you create recommended indexes, for example, estimated storage size and impact of indexes on a query.

You can also use the index advisor with
[query insights](https://docs.cloud.google.com/alloydb/docs/query-insights-overview.md.txt).
The index advisor stores and displays the `CREATE INDEX` command that contains 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](https://docs.cloud.google.com/alloydb/docs/use-index-advisor.md.txt). For more information how
to use it with query insights, see
[Use index advisor with query insights](https://docs.cloud.google.com/alloydb/docs/use-index-advisor-with-query-insights.md.txt).