Skip to content

Commit b3fd694

Browse files
Merge pull request #275862 from nachoalonsoportillo/fixes-index-tuning
Fixes for Build
2 parents 241bf63 + 6b80c6a commit b3fd694

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

articles/postgresql/flexible-server/concepts-index-tuning.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article describes the index tuning feature in Azure Database f
44
author: nachoalonsoportillo
55
ms.author: ialonso
66
ms.reviewer: maghan
7-
ms.date: 05/08/2024
7+
ms.date: 05/21/2024
88
ms.service: postgresql
99
ms.subservice: flexible-server
1010
ms.topic: concept-article
@@ -32,7 +32,7 @@ When the `index_tuning.mode` server parameter is configured to `report`, tuning
3232

3333
In the first phase, the tuning session searches for the list of databases in which it considers that whatever recommendations it might produce might significantly impact the overall performance of the system. To do so, it collects all queries recorded by Query Store whose executions were captured within the lookup interval this tuning session is focusing on. The lookup interval currently spans to the past `index_tuning.analysis_interval` minutes, from the starting time of the tuning session.
3434

35-
For all user-initiated queries with executions recorded in Query Store and whose runtime statistics aren't [reset](./concepts-query-store.md#query_storeqs_reset), the system ranks them based on their aggregated total execution time. It focuses its attention on the top 100 more prominent queries.
35+
For all user-initiated queries with executions recorded in Query Store and whose runtime statistics aren't [reset](./concepts-query-store.md#query_storeqs_reset), the system ranks them based on their aggregated total execution time. It focuses its attention on the most prominent queries, based on their duration.
3636

3737
The following queries are excluded from that list:
3838
- System-initiated queries. (that is, queries executed by `azuresu` role)
@@ -58,7 +58,7 @@ Potential recommendations aim to improve the performance of these types of queri
5858
- Queries with sorting (queries with an ORDER BY clause).
5959
- Queries combining filters and sorting.
6060

61-
> [!NOTE]
61+
> [!NOTE]
6262
> The only type of indexes the system currently recommends are those of type [B-Tree](https://www.postgresql.org/docs/current/indexes-types.html#INDEXES-TYPES-BTREE).
6363
6464
If a query references one column of a table and that table has no statistics because it was never analyzed (manually using the ANALYZE command or automatically by the autovacuum daemon), then the whole query is skipped, and no indexes are recommended to improve its execution.
@@ -71,6 +71,9 @@ For an index recommendation to be emitted, the tuning engine must estimate that
7171

7272
Likewise, all index recommendations are checked to ensure that they don't introduce regression on any single query in that workload of a factor specified with `index_tuning.max_regression_factor`.
7373

74+
> [!NOTE]
75+
> `index_tuning.min_improvement_factor` and `index_tuning.max_regression_factor` both refer to cost of query plans, not to their duration or the resources they consume during execution.
76+
7477
All the parameters mentioned in the previous paragraphs, their default values and valid ranges are described in [configuration options](how-to-configure-index-tuning.md#configuration-options).
7578

7679
The script produced along with the recommendation to create an index, follows this pattern:
@@ -87,7 +90,7 @@ The impact of creating an index recommendation is measured on IndexSize (megabyt
8790

8891
IndexSize is a single value that represents the estimated size of the index, considering the current cardinality of the table and the size of the columns referenced by the recommended index.
8992

90-
QueryCostImprovement consists of an array of values, where each element represents the improvement in the plan's cost for each query whose plan's cost is estimated to improve if this index existed. Each element shows the query's identifier (queried) and the percentage by which the plan's cost would improve if the recommendation were implemented (dimensional). DimensionValue is hard-coded to a fixed value of 30%, arbitrarily assigned to all queries.
93+
QueryCostImprovement consists of an array of values, where each element represents the improvement in the plan's cost for each query whose plan's cost is estimated to improve if this index existed. Each element shows the query's identifier (queried) and the percentage by which the plan's cost would improve if the recommendation were implemented (dimensional).
9194

9295
### DROP INDEX recommendations
9396

@@ -166,12 +169,15 @@ Index tuning feature is available in the following regions:
166169
Index tuning is supported on all [currently available tiers](concepts-compute.md): Burstable, General Purpose, and Memory Optimized, and on any [currently supported compute SKU](concepts-compute.md) with at least 4 vCores.
167170

168171
> [!IMPORTANT]
169-
> If a server has index tuning enabled and is scaled down to a compute with less than the minimum number of required vCores, the feature will remain enabled. However, if you plan to enable the feature in a server which is less than 4 vCores, the change will be rejected and a descriptive error will be reported back to the user. If you plan to scale down your instance to less than 4 vCores, make sure you disable index tuning first, setting `index_tuning.mode`to `OFF`.
172+
> If a server has index tuning enabled and is scaled down to a compute with less than the minimum number of required vCores, the feature will remain enabled. Because the feature is not supported on servers with less than 4 vCores, ifyou plan to enable it in a server which is less than 4 vCores, or you plan to scale down your instance to less than 4 vCores, make sure you disable index tuning first, setting `index_tuning.mode`to `OFF`.
170173
171174
### Supported versions of PostgreSQL
172175

173176
Index tuning is supported on [major versions](concepts-supported-versions.md) **14 or greater** of Azure Database for PostgreSQL Flexible Server.
174177

178+
> [!IMPORTANT]
179+
> Although you can enable the feature on instances running versions lower than 14, you're not expected to do it as the feature is not supported in those versions.
180+
175181
### Read-only mode and read replicas
176182

177183
When an Azure Database for PostgreSQL - Flexible Server instance is in read-only modes, such as when the `default_transaction_read_only` parameter is set to `on,` or if the read-only mode is [automatically enabled due to reaching storage capacity](concepts-limits.md#storage), Query Store doesn't capture any data.

articles/postgresql/flexible-server/how-to-get-and-apply-recommendations-from-index-tuning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article describes how to query, interpret, and apply the recom
44
author: nachoalonsoportillo
55
ms.author: ialonso
66
ms.reviewer: maghan
7-
ms.date: 05/09/2024
7+
ms.date: 05/21/2024
88
ms.service: postgresql
99
ms.subservice: flexible-server
1010
ms.custom:
@@ -32,7 +32,7 @@ Currently, that information can be read using the Azure portal page build for th
3232

3333
- If the feature is enabled and no recommendations are produced yet, the screen looks like this:
3434

35-
:::image type="content" source="media/how-to-get-and-apply-recommendations-from-index-tuning/index-tuning-page-when-enabled-and-has-recommendations.png" alt-text="Screenshot that shows the aspect of 'Index tuning (preview)' page when the feature is enabled and there aren't recommendations." lightbox="media/how-to-get-and-apply-recommendations-from-index-tuning/index-tuning-page-when-enabled-and-has-recommendations.png":::
35+
:::image type="content" source="media/how-to-get-and-apply-recommendations-from-index-tuning/index-tuning-page-when-enabled-and-no-recommendations.png" alt-text="Screenshot that shows the aspect of 'Index tuning (preview)' page when the feature is enabled and there aren't recommendations." lightbox="media/how-to-get-and-apply-recommendations-from-index-tuning/index-tuning-page-when-enabled-and-no-recommendations.png":::
3636

3737
- If the feature is disabled but it ever produced recommendations, the screen looks like this:
3838

0 commit comments

Comments
 (0)