使用 Azure 门户配置 Azure Database for PostgreSQL 灵活服务器的智能优化

适用于:Azure Database for PostgreSQL 灵活服务器

本文提供了使用 Azure 门户在 Azure Database for PostgreSQL 灵活服务器中配置智能优化的分步过程。

若要了解有关智能优化的详细信息,请参阅概述

重要

目前,拥有 4 个或以上 vCore 的“常规用途”和“内存优化”服务器计算层支持自动清理优化。 不支持可突发服务器计算层。

在灵活服务器上启用智能优化的步骤

  1. 访问 Azure 门户,并选择要对其启用智能优化的 Azure Database for PostgreSQL 灵活服务器实例。

  2. 在左窗格中,选择“服务器参数”,然后搜索“智能优化”。

    Screenshot of the pane for server parameters with a search for intelligent tuning.

  3. 该窗格显示两个参数:intelligent_tuningintelligent_tuning.metric_targets。 若要激活智能优化,请将 intelligent_tuning 更改为“开”。 可根据需要在 intelligent_tuning.metric_targets 中选择一个、多个或所有可用的优化目标。 选择“保存”按钮可应用这些更改。

    Screenshot of Server Parameter blade with tuning targets options.

注意

intelligent_tuningintelligent_tuning.metric_targets 服务器参数均是动态的。 也就是说,当服务器的值发生更改时,无需重启服务器。

为优化目标选择值时的注意事项

intelligent_tuning.metric_targets 服务器参数中选择值时,请考虑以下注意事项:

  • NONE 值优先于所有其他值。 如果选择 NONE 与其他值的任意组合,则该参数被视为设置为 NONE。 这相当于 intelligent_tuning = OFF,因此不会进行优化。

  • ALL 值优先于所有其他值,但 NONE 除外。 如果选择具有任意组合的 ALL,则除了 NONE 之外,所有列出的参数都会进行优化。

  • ALL 值包含所有现有指标目标。 此值还会自动应用于你将来可能添加的任何新指标目标。 这使得可对 Azure Database for PostgreSQL 灵活服务器实例进行全面且经得起未来考验的优化。

后续步骤