You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/concepts-index-tuning.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article describes the index tuning feature in Azure Database f
4
4
author: nachoalonsoportillo
5
5
ms.author: ialonso
6
6
ms.reviewer: maghan
7
-
ms.date: 05/08/2024
7
+
ms.date: 05/21/2024
8
8
ms.service: postgresql
9
9
ms.subservice: flexible-server
10
10
ms.topic: concept-article
@@ -32,7 +32,7 @@ When the `index_tuning.mode` server parameter is configured to `report`, tuning
32
32
33
33
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.
34
34
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.
36
36
37
37
The following queries are excluded from that list:
38
38
- 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
58
58
- Queries with sorting (queries with an ORDER BY clause).
59
59
- Queries combining filters and sorting.
60
60
61
-
> [!NOTE]
61
+
> [!NOTE]
62
62
> 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).
63
63
64
64
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
71
71
72
72
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`.
73
73
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
+
74
77
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).
75
78
76
79
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
87
90
88
91
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.
89
92
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).
91
94
92
95
### DROP INDEX recommendations
93
96
@@ -166,12 +169,15 @@ Index tuning feature is available in the following regions:
166
169
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.
167
170
168
171
> [!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`.
170
173
171
174
### Supported versions of PostgreSQL
172
175
173
176
Index tuning is supported on [major versions](concepts-supported-versions.md)**14 or greater** of Azure Database for PostgreSQL Flexible Server.
174
177
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
+
175
181
### Read-only mode and read replicas
176
182
177
183
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.
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-get-and-apply-recommendations-from-index-tuning.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article describes how to query, interpret, and apply the recom
4
4
author: nachoalonsoportillo
5
5
ms.author: ialonso
6
6
ms.reviewer: maghan
7
-
ms.date: 05/09/2024
7
+
ms.date: 05/21/2024
8
8
ms.service: postgresql
9
9
ms.subservice: flexible-server
10
10
ms.custom:
@@ -32,7 +32,7 @@ Currently, that information can be read using the Azure portal page build for th
32
32
33
33
- If the feature is enabled and no recommendations are produced yet, the screen looks like this:
34
34
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":::
36
36
37
37
- If the feature is disabled but it ever produced recommendations, the screen looks like this:
0 commit comments