Skip to content

Commit 1668cf5

Browse files
Merge pull request #277553 from nachoalonsoportillo/fixes-index-tuning-2
Add note about prepared statements
2 parents 2b79de5 + 7e7e517 commit 1668cf5

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Index tuning
3-
description: This article describes the index tuning feature in Azure Database for PostgreSQL - Flexible Server.
2+
title: Automated index tuning
3+
description: This article describes the automated index tuning feature in Azure Database for PostgreSQL - Flexible Server.
44
author: nachoalonsoportillo
55
ms.author: ialonso
66
ms.reviewer: maghan
@@ -38,7 +38,7 @@ The following queries are excluded from that list:
3838
- System-initiated queries. (that is, queries executed by `azuresu` role)
3939
- Queries executed in the context of any system database (`azure_sys`, `template0`, `template1`, and `azure_maintenance`).
4040

41-
The algorithm iterates over the target databases, searching for possible indexes that could improve the performance of analyzed workloads. It also searches for indexes that can be eliminated because they're identified as duplicates or haven't been used for a long period of time.
41+
The algorithm iterates over the target databases, searching for possible indexes that could improve the performance of analyzed workloads. It also searches for indexes that can be eliminated because they're identified as duplicates or not used for a configurable period of time.
4242

4343
### CREATE INDEX recommendations
4444

@@ -61,7 +61,9 @@ Potential recommendations aim to improve the performance of these types of queri
6161
> [!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
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.
64+
If a query references one column of a table and that table has no statistics, then the whole query is skipped and results in no index recommendations to improve its execution.
65+
66+
Analysis required to gather statistics can be triggered manually using the ANALYZE command or automatically by the autovacuum daemon.
6567

6668
`index_tuning.max_indexes_per_table` specifies the number of indexes that can be recommended, excluding any indexes that might already exist on the table for any single table referenced by any number of queries during a tuning session.
6769

@@ -147,10 +149,11 @@ Index tuning in Azure Database for PostgreSQL - Flexible Server has the followin
147149
- The feature is available in specific regions, including East Asia, Central India, North Europe, Southeast Asia, South Central US, UK South, and West US 3.
148150
- Index tuning is supported on all currently available tiers (Burstable, General Purpose, and Memory Optimized) and on any currently supported compute SKU with at least 4 vCores.
149151
- The feature is supported on major versions 14 or greater of Azure Database for PostgreSQL Flexible Server.
152+
- [Prepared statements](https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY) aren't analyzed to produce recommendations on them.
150153
- In read replicas or when an instance is in read-only mode, index tuning isn't supported.
151154
- It's important to consider the implications of creating recommended indexes on servers with high availability or read replicas, especially when the size of the indexes is estimated to be large.
152155

153-
For more information on index tuning and related articles, see the documentation links provided below.
156+
For more information on index tuning and related articles, see the documentation links provided in [Related content](#related-content).
154157

155158
### Supported regions
156159

@@ -178,25 +181,26 @@ Index tuning is supported on [major versions](concepts-supported-versions.md) **
178181
> [!IMPORTANT]
179182
> 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.
180183
184+
### Prepared statements
185+
186+
Currently, index tuning doesn't analyze [prepared statements](https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY).
187+
181188
### Read-only mode and read replicas
182189

183190
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.
184191

185-
Also, index tuning isn't supported currently on read replicas. Any recommendations seen on a read replica, is one that has been produced on the primary replica after having analyzed the workload recorded in it.
192+
Also, index tuning isn't supported currently on read replicas. Any recommendations seen on a read replica, were produced on the primary replica after having analyzed the workload recorded in it.
186193

187194
### Network connectivity method
188195

189196
Index tuning is currently supported on instances whose connectivity method is configured as [Public access (allowed IP addresses)](concepts-networking-public.md). For instances configured with [Private access (VNET Integration)](concepts-networking-private.md) the feature can be enabled, but it won't generate recommendations.
190197

191198
### Important considerations
192199

193-
If you have [high availability](../../reliability/reliability-postgresql-flexible-server.md) or [read replicas](concepts-read-replicas.md) configured on your server, be aware of the implications associated with producing write-intensive workloads on the primary server when recommended indexes are created by the index tuning feature. Be especially careful when creating indexes whose size is estimated to be large.
200+
If you have [high availability](../../reliability/reliability-postgresql-flexible-server.md) or [read replicas](concepts-read-replicas.md) configured on your server, be aware of the implications associated with producing write-intensive workloads on the primary server when indexes recommended are implemented. Be especially careful when creating indexes whose size is estimated to be significantly large.
194201

195202
## Related content
196203

197204
- [Monitor performance with Query Store](concepts-query-store.md)
198-
- [Usage scenarios for Query Store - Azure Database for PostgreSQL - Flexible Server](concepts-query-store-scenarios.md)
199-
- [Best practices for Query Store - Azure Database for PostgreSQL - Flexible Server](concepts-query-store-best-practices.md)
200-
- [Query Performance Insight for Azure Database for PostgreSQL - Flexible Server](concepts-query-performance-insight.md)
201205
- [Enable, disable and configure index tuning](how-to-configure-index-tuning.md)
202206
- [Read, interpret and use recommendations produced by index tuning](how-to-get-and-apply-recommendations-from-index-tuning.md)

0 commit comments

Comments
 (0)