az postgres flexible-server index-tuning

索引优化可分析查询存储中捕获的读取查询,并建议更改索引以优化这些查询。

命令

名称 说明 类型 Status
az postgres flexible-server index-tuning list-recommendations

获取与 PostgreSQL 灵活服务器关联的可用优化索引建议。

核心 GA
az postgres flexible-server index-tuning list-settings

获取与 PostgreSQL 灵活服务器关联的优化设置。

核心 GA
az postgres flexible-server index-tuning set-settings

更新 PostgreSQL 灵活服务器的优化设置。

核心 GA
az postgres flexible-server index-tuning show

显示 PostgreSQL 灵活服务器的索引优化状态。

核心 GA
az postgres flexible-server index-tuning show-settings

获取 PostgreSQL 灵活服务器的优化设置。

核心 GA
az postgres flexible-server index-tuning update

更新要为 PostgreSQL 灵活服务器启用/禁用的索引优化。

核心 GA

az postgres flexible-server index-tuning list-recommendations

获取与 PostgreSQL 灵活服务器关联的可用优化索引建议。

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

示例

获取 PostgreSQL 灵活服务器的优化索引建议。 按所选类型进行筛选。

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

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--recommendation-type -r

基于类型检索建议。

接受的值: CreateIndex, DropIndex
--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

az postgres flexible-server index-tuning list-settings

获取与 PostgreSQL 灵活服务器关联的优化设置。

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

示例

获取 PostgreSQL 灵活服务器的优化设置。

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

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

az postgres flexible-server index-tuning set-settings

更新 PostgreSQL 灵活服务器的优化设置。

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]

示例

更新 PostgreSQL 灵活服务器的优化设置。

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

必需参数

--name -n

优化设置的名称。

接受的值: 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

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--value -v

优化设置的值。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

az postgres flexible-server index-tuning show

显示 PostgreSQL 灵活服务器的索引优化状态。

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

示例

显示 PostgreSQL 灵活服务器的索引优化状态。

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

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

az postgres flexible-server index-tuning show-settings

获取 PostgreSQL 灵活服务器的优化设置。

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]

示例

获取 PostgreSQL 灵活服务器的优化设置。

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

必需参数

--name -n

优化设置的名称。

接受的值: 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

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

az postgres flexible-server index-tuning update

更新要为 PostgreSQL 灵活服务器启用/禁用的索引优化。

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

示例

更新要为 PostgreSQL 灵活服务器启用/禁用的索引优化。

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

必需参数

--enabled

启用或禁用索引优化功能。

接受的值: False, True

可选参数

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--server-name -s

服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。