Udostępnij za pośrednictwem


az postgres flexible-server index-tuning

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 GA
az postgres flexible-server index-tuning list-settings

Get tuning settings associated for a PostgreSQL flexible server.

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

Update a tuning setting for a PostgreSQL flexible server.

Core GA
az postgres flexible-server index-tuning show

Show state of index tuning for a PostgreSQL flexible server.

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

Get a tuning setting for a PostgreSQL flexible server.

Core GA
az postgres flexible-server index-tuning update

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

Core GA

az postgres flexible-server index-tuning list-recommendations

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

az postgres flexible-server index-tuning list-recommendations [--ids]
                                                              [--recommendation-type {CreateIndex, DropIndex}]
                                                              [--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

--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.

--recommendation-type -r

Retrieve recommendations based on type.

Accepted values: CreateIndex, DropIndex
--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

az postgres flexible-server index-tuning list-settings

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

--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.

--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

az postgres flexible-server index-tuning set-settings

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.

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

--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.

--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

--value -v

Value of the tuning setting.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

az postgres flexible-server index-tuning show

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

--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.

--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

az postgres flexible-server index-tuning show-settings

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.

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

--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.

--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

az postgres flexible-server index-tuning update

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.

Accepted values: False, True

Optional Parameters

--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.

--resource-group -g

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

--server-name -s

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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