Share via


az postgres flexible-server index-tuning

Index tuning feature has now expanded its capabilities to support other automatically generated recommendations which are covered by the new command.

Index tuning analyzes read queries captured in Query Store and recommends index changes to optimize these queries.

Commands

Name Description Type Status
az postgres flexible-server index-tuning list-recommendations

Get available tuning index recommendations associated with a PostgreSQL flexible server.

Core Deprecated
az postgres flexible-server index-tuning list-settings

Get tuning settings associated for a PostgreSQL flexible server.

Core Deprecated
az postgres flexible-server index-tuning set-settings

Update a tuning setting for a PostgreSQL flexible server.

Core Deprecated
az postgres flexible-server index-tuning show

Show state of index tuning for a PostgreSQL flexible server.

Core Deprecated
az postgres flexible-server index-tuning show-settings

Get a tuning setting for a PostgreSQL flexible server.

Core Deprecated
az postgres flexible-server index-tuning update

Update index tuning to be enabled/disabled for a PostgreSQL flexible server.

Core Deprecated

az postgres flexible-server index-tuning list-recommendations

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Get available tuning index recommendations associated with a PostgreSQL flexible server.

az postgres flexible-server index-tuning list-recommendations [--ids]
                                                              [--recommendation-type {CreateIndex, DropIndex, ReIndex}]
                                                              [--resource-group]
                                                              [--server-name]
                                                              [--subscription]

Examples

Get tuning index recommendations for a PostgreSQL flexible server. Filter by selected type.

az postgres flexible-server index-tuning list-recommendations -g testgroup -s testsvr --recommendation-type CreateIndex

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--recommendation-type -r

Retrieve recommendations based on type.

Property Value
Accepted values: CreateIndex, DropIndex, ReIndex
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server index-tuning list-settings

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Get tuning settings associated for a PostgreSQL flexible server.

az postgres flexible-server index-tuning list-settings [--ids]
                                                       [--resource-group]
                                                       [--server-name]
                                                       [--subscription]

Examples

Get tuning settings for a PostgreSQL flexible server.

az postgres flexible-server index-tuning list-settings -g testgroup -s testsvr

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server index-tuning set-settings

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Update a tuning setting for a PostgreSQL flexible server.

az postgres flexible-server index-tuning set-settings --name {analysis_interval, max_columns_per_index, max_index_count, max_indexes_per_table, max_queries_per_database, max_regression_factor, max_total_size_factor, min_improvement_factor, mode, unused_dml_per_table, unused_min_period, unused_reads_per_table}
                                                      [--ids]
                                                      [--resource-group]
                                                      [--server-name]
                                                      [--subscription]
                                                      [--value]

Examples

Update a tuning setting for a PostgreSQL flexible server.

az postgres flexible-server index-tuning set-settings -g testgroup -s testsvr --name setting-name --value setting-value

Required Parameters

--name -n

The name of the tuning setting.

Property Value
Accepted values: analysis_interval, max_columns_per_index, max_index_count, max_indexes_per_table, max_queries_per_database, max_regression_factor, max_total_size_factor, min_improvement_factor, mode, unused_dml_per_table, unused_min_period, unused_reads_per_table

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--value -v

Value of the tuning setting.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server index-tuning show

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Show state of index tuning for a PostgreSQL flexible server.

az postgres flexible-server index-tuning show [--ids]
                                              [--resource-group]
                                              [--server-name]
                                              [--subscription]

Examples

Show state of index tuning for a PostgreSQL flexible server.

az postgres flexible-server index-tuning show -g testgroup -s testsvr

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server index-tuning show-settings

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Get a tuning setting for a PostgreSQL flexible server.

az postgres flexible-server index-tuning show-settings --name {analysis_interval, max_columns_per_index, max_index_count, max_indexes_per_table, max_queries_per_database, max_regression_factor, max_total_size_factor, min_improvement_factor, mode, unused_dml_per_table, unused_min_period, unused_reads_per_table}
                                                       [--ids]
                                                       [--resource-group]
                                                       [--server-name]
                                                       [--subscription]

Examples

Get a tuning setting for a PostgreSQL flexible server.

az postgres flexible-server index-tuning show-settings -g testgroup -s testsvr --name setting-name

Required Parameters

--name -n

The name of the tuning setting.

Property Value
Accepted values: analysis_interval, max_columns_per_index, max_index_count, max_indexes_per_table, max_queries_per_database, max_regression_factor, max_total_size_factor, min_improvement_factor, mode, unused_dml_per_table, unused_min_period, unused_reads_per_table

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az postgres flexible-server index-tuning update

Deprecated

This command is implicitly deprecated because command group 'postgres flexible-server index-tuning' is deprecated and will be removed in a future release. Use 'postgres flexible-server autonomous-tuning' instead.

Update index tuning to be enabled/disabled for a PostgreSQL flexible server.

az postgres flexible-server index-tuning update --enabled {False, True}
                                                [--ids]
                                                [--resource-group]
                                                [--server-name]
                                                [--subscription]

Examples

Update index tuning to be enabled/disabled for a PostgreSQL flexible server.

az postgres flexible-server index-tuning update -g testgroup -s testsvr --enabled True

Required Parameters

--enabled

Enable or disable index tuning feature.

Property Value
Accepted values: False, True

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False