【问题标题】:Performance tuning in Redshift for multiple update statementRedshift 中针对多个更新语句的性能调整
【发布时间】:2020-11-26 13:52:05
【问题描述】:

我在 redshift 中有一个容量很大的表,我需要在不同的列上运行多个更新语句,加入一些静态表需要一个多小时才能完成所有更新执行,有什么办法可以提高性能对于这个查询。

例如:

update customer
set x=y.x
from y

update customer
set z=a.z
from a

update customer
set b=d.b
from b

【问题讨论】:

    标签: sql amazon-redshift


    【解决方案1】:

    创建一个包含所有更改的临时表,并将它们全部放在一个 UPDATE 语句中。

    【讨论】:

      猜你喜欢
      • 2014-05-26
      • 2015-07-27
      • 2017-08-29
      • 1970-01-01
      • 2021-04-11
      • 2015-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多