Configure autonomous tuning

Autonomous tuning can be enabled, disabled, and configured through a set of parameters that control its behavior, such as how often a tuning session should run.

Autonomous tuning depends on the data persisted locally to the azure_sys database by query store. We don't recommend enabling query store on the Burstable pricing tier, due to the performance implications it might have. For the same reason, autonomous tuning isn't recommended for servers using compute from the Burstable tier.

Autonomous tuning is an opt-in feature that isn't enabled by default on a server. It can be enabled or disabled globally for all databases on a given server and can't be turned on or off per database.

Steps to enable autonomous tuning

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server instance.

  2. In the resource menu, under Intelligent Performance, select Autonomous tuning.

    Screenshot that shows the Autonomous tuning menu option under the Intelligent Performance section, to enable autonomous tuning.

  3. If either pg_qs.query_capture_mode is set to none or index_tuning.mode is set to off, the Autonomous tuning page gives you the option to enable autonomous tuning. Select on either of the two Enable tuning buttons, to enable autonomous tuning feature and its required query store dependency, if query store is disabled.

    Screenshot that shows how to enable autonomous tuning through the Autonomous tuning page.

  4. Wait for the deployment to complete successfully before considering that the feature is enabled.

    Screenshot that shows the deployment completed to enable autonomous tuning.

  5. After enabling autonomous tuning, allow up to 12 hours for the autonomous tuning engine to analyze the workload collected by query store during that time, and eventually produce recommendations.

Important

When autonomous tuning is enabled through the Enable tuning button, if pg_qs.query_capture_mode is set to none, it's changed to all. If it was already set to either top or all, it's left in its current state.

Steps to disable autonomous tuning

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server instance.

  2. In the resource menu, under Intelligent Performance, select Autonomous tuning.

    Screenshot that shows the Autonomous tuning menu option under the Intelligent Performance section, to disable autonomous tuning.

  3. Select Disable tuning to disable the feature.

    Screenshot that shows how to disable autonomous tuning through the Autonomous tuning page.

  4. Wait for the deployment to complete successfully before considering that the feature is disabled.

    Screenshot that shows the deployment completed to disable autonomous tuning.

  5. Assess whether you want to continue using query store to monitor the performance of your workload and leave it enabled or, if you want to disable it, do so by setting pg_qs.query_capture_mode to none.

Important

When autonomous tuning is disabled through the Disable tuning button, server parameter pg_qs.query_capture_mode isn't set to none, but left as it is configured.

Steps to show the state of autonomous tuning

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server instance.

  2. In the resource menu, under Intelligent Performance, select Autonomous tuning.

    Screenshot that shows the Autonomous tuning menu option under the Intelligent Performance section, to disable autonomous tuning.

  3. If autonomous tuning is enabled, the page displays the Disable tuning button.

    Screenshot that shows the aspect of the Autonomous tuning page when the feature is enabled.

  4. If autonomous tuning is disabled, the page displays the Enable tuning button.

    Screenshot that shows the aspect of the Autonomous tuning page when the feature is disabled.

Steps to list autonomous tuning settings

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server instance.

  2. In the resource menu, under Intelligent Performance, select Autonomous tuning.

    Screenshot that shows the Autonomous tuning menu option under the Intelligent Performance section, to disable autonomous tuning.

  3. Select Tuning settings.

    Screenshot that shows the Tune settings button in the Autonomous tuning page.

Steps to modify autonomous tuning settings

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server instance.

  2. In the resource menu, under Intelligent Performance, select Autonomous tuning.

    Screenshot that shows the Autonomous tuning menu option under the Intelligent Performance section, to disable autonomous tuning.

  3. Select Tuning settings.

    Screenshot that shows the Tune settings button in the Autonomous tuning page.

  4. Modify the values of as many settings as you want to change, and select Save.

    Screenshot that shows the aspect of the Autonomous tuning page when the feature is enabled.

  5. Wait for the deployment to complete successfully before considering that the value of the settings is changed.

    Screenshot that shows a successfully completed deployment to modify one or more autonomous tuning settings.