【问题标题】:Redshift order of sory keys vs table creation column order排序键的红移顺序与表创建列顺序
【发布时间】:2020-01-16 16:41:42
【问题描述】:

我在 Redshift 中有一个表,列有“a1_timestamp、a2_cd、a3_id、a4、a5”(按此顺序)。我想在“a3_id 和 a1_timestamp”列上创建排序键。

由于创建表时使用 a1_timestamp 作为第一列,a3_id 作为第三列,排序键是否需要按该顺序排列?这些是复合排序键。

【问题讨论】:

    标签: amazon-web-services amazon-redshift


    【解决方案1】:

    列顺序不影响排序键。您可以创建排序键altering the table

    将数据加载到表中时,数据按排序键的顺序加载。当您更改排序键时,Amazon Redshift 会重新排序数据

    但这不会对列重新排序。

    【讨论】:

      猜你喜欢
      • 2022-06-24
      • 1970-01-01
      • 2014-02-14
      • 2012-09-16
      • 2015-02-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-20
      • 2015-11-22
      相关资源
      最近更新 更多