你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az postgres flexible-server autonomous-tuning

自治优化可分析查询存储中捕获的读取查询,并建议对表或索引更改执行的作来优化这些查询。

命令

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

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

Core GA
az postgres flexible-server autonomous-tuning list-settings

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

Core GA
az postgres flexible-server autonomous-tuning list-table-recommendations

获取与 PostgreSQL 灵活服务器关联的可用自治优化表建议。

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

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

Core GA
az postgres flexible-server autonomous-tuning show

显示 PostgreSQL 灵活服务器的自治优化状态。

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

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

Core GA
az postgres flexible-server autonomous-tuning update

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

Core GA

az postgres flexible-server autonomous-tuning list-index-recommendations

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

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

示例

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

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--ids

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

属性
参数组: Resource Id Arguments
--recommendation-type -r

基于类型检索建议。

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

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning list-settings

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

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

示例

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

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--ids

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning list-table-recommendations

获取与 PostgreSQL 灵活服务器关联的可用自治优化表建议。

az postgres flexible-server autonomous-tuning list-table-recommendations [--ids]
                                                                         [--recommendation-type {AnalyzeTable, VacuumTable}]
                                                                         [--resource-group]
                                                                         [--server-name]
                                                                         [--subscription]

示例

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

az postgres flexible-server autonomous-tuning list-table-recommendations -g testgroup -s testsvr --recommendation-type AnalyzeTable

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--ids

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

属性
参数组: Resource Id Arguments
--recommendation-type -r

基于类型检索建议。

属性
接受的值: AnalyzeTable, VacuumTable
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning set-settings

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

az postgres flexible-server autonomous-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 autonomous-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 Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--value -v

优化设置的值。

全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning show

显示 PostgreSQL 灵活服务器的自治优化状态。

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

示例

显示 PostgreSQL 灵活服务器的自治优化状态。

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--ids

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning show-settings

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

az postgres flexible-server autonomous-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 autonomous-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 Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False

az postgres flexible-server autonomous-tuning update

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

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

示例

更新要为 PostgreSQL 灵活服务器启用的自治优化。

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

更新要为 PostgreSQL 灵活服务器禁用的自治优化。

az postgres flexible-server autonomous-tuning update -g testgroup -s testsvr --enabled False

必需参数

--enabled

启用或禁用自治优化功能。

属性
接受的值: False, True

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--ids

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--server-name -s

服务器的名称。

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
全局参数
--debug

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

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

属性
默认值: False
--output -o

输出格式。

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

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

--verbose

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

属性
默认值: False