You can use AlloyDB for PostgreSQL database flags to enable and manage features for the index advisor extension and the capability to tune SQL queries (in Preview).
Index advisor flags
The following table lists the database flags for the index advisor:
google_db_advisor.auto_advisor_max_time_in_seconds_per_day |
The maximum time, in seconds per day, that the index advisor spends running automated analyses of its tracked queries. |
||||||
google_db_advisor.auto_advisor_schedule |
Defines the frequency of the index advisor's automated
analysis. The value is a single-quoted string of the format
|
||||||
google_db_advisor.enable_auto_advisor |
If |
||||||
google_db_advisor.enable_vector_index_advisor |
Recommends ScaNN vector indexes depending on the workload.
Requires that you enable the |
||||||
google_db_advisor.enabled |
Controls whether the AlloyDB index advisor is enabled. |
||||||
google_db_advisor.max_index_width |
The maximum number of columns that a recommended index can contain. |
||||||
google_db_advisor.max_num_indexable_columns |
The maximum number of indexable columns that the index advisor tracks. |
||||||
google_db_advisor.max_statement_length |
The maximum length, in bytes, of queries that the index advisor tracks. |
||||||
google_db_advisor.max_storage_size_in_mb |
The maximum total size, in megabytes, of the indexes that the index advisor recommends. If set to
|
||||||
google_db_advisor.recommend_indexes_on_partitions |
Controls whether to enable recommending indexes on individual table partitions. |
||||||
google_db_advisor.recommendation_max_time_in_seconds |
The maximum time, in seconds, that the index advisor spends running an analysis of its tracked queries. |
||||||
google_db_advisor.top_k_slowest_statements |
The index advisor bases its recommendations on the slowest-executing statements out of all the queries it tracks. The value set by this flag defines the size of this set. If set to |
SQL tuning flags
The following table lists the database flags for SQL query tuning:
google_db_advisor.enable_ai_tune_sql |
If |
||||||
google_db_advisor.llm_model_id |
Specifies the model ID of the registered LLM endpoint that
AlloyDB uses to generate SQL query tuning
recommendations with the |