Automatic database optimization - Amazon Redshift

Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025. If you would like to use Python UDFs, create the UDFs prior to that date. Existing Python UDFs will continue to function as normal. For more information, see the blog post .

Automatic database optimization

Amazon Redshift hosts a set of automated features, termed collectively as autonomics, that enhance performance, reduce manual maintenance, and optimize resource usage. Autonomics leverage machine learning and background processes to manage database operations efficiently, automating many routine maintenance tasks to reduce database administrator workload.

The following table details Amazon Redshift's autonomics features:

Autonomics feature Description

Automatic vacuum sort

Amazon Redshift automatically reorganizes table data based on observed query patterns to ensure optimal sort order. This feature is enabled by default for tables with specified sort keys. For more information, see Automatic table sort.

Automatic vacuum delete

Amazon Redshift automatically runs vacuum operations to reclaim space from deleted rows and sort data. For more information on automatic vacuum delete operations, see Automatic vacuum delete.

Automatic table optimization

Amazon Redshift monitors query performance and table metadata to automatically determine the best sort and distribution keys for tables, and chooses the type of compression that is applied to a column of data values as rows are added to a table. For more information, see Automatic table optimization and Compression encodings.

Automatic analyze

Amazon Redshift automatically analyzes tables as the data within them changes, ensuring that the query planner has up-to-date information for optimal execution plans. For more information on automatic analyze operations, see Automatic analyze.

Automated materialized views

Amazon Redshift automatically creates and refreshes materialized views based on observed query patterns. This reduces the need for users to manually create or refresh views to benefit from faster query responses. For more information on materialized views, see Materialized views in Amazon Redshift.

These autonomics features are enabled by default and run automatically in the background during low-traffic periods to optimize your cluster's performance. You can refer to the Default parameter values in the Amazon Redshift Management Guide to configure automatic features.

For clusters or workgroups with sustained high traffic, we recommend enabling extra compute resources to ensure continuous optimization. For more information, see Allocating extra compute resources for automatic database optimization.