Long Running VACUUM DELETE Redshift

0

On a table with size ~30 TB, vacuum delete with ~ 70 millions rows deletion took 6 hours.

Is it normal? What can be done to decrease vacuum delete time ?

Thank you.

AWS
已提问 7 个月前334 查看次数
1 回答
3

Hello,

Redshift automatically performs vacuum sort and vacuum delete operations on tables in the background implicitly. These background vacuums run during periods of reduced loads and are paused during periods of high load and that vacuum is not prioritize in comparison to other cluster workload. That is to say when there are high workload on the cluster the vacuum operation will pause to prioritize other workloads. Thus, it's common to see long running vacuum operation during cluster peak hours. So, I feel your case might be normal considering these factors.

Automatic vacuum operations pause if any of the following conditions are met:

  • A user runs a data definition language (DDL) operation, such as ALTER TABLE, that requires an exclusive lock on a table that automatic vacuum is currently working on.
  • A user triggers VACUUM on any table in the cluster (only one VACUUM can run at a time).
  • A period of high cluster load.

Furthermore, below factors may affect the performance of Redshift Auto Vacuum:

  • High percentage of unsorted data
  • Large table with too many columns
  • Interleaved sort key usage
  • Irregular or infrequent use of VACUUM
  • Concurrent tables, cluster queries, DDL statements, or ETL jobs

You can also override the WLM slot count when you have occasional queries that take a lot of resources in the cluster, such as when you perform a VACUUM operation in the database. see here for ref : https://docs.aws.amazon.com/redshift/latest/dg/tutorial-wlm-query-slot-count.html

To troubleshoot performance issues with VACUUM in Amazon Redshift please see our post: https://repost.aws/knowledge-center/redshift-vacuum-performance

AWS
支持工程师
已回答 7 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则