数据仓库服务 GAUSSDB(DWS)-CLUSTERED KEY

时间:2024-12-10 11:28:49

CLUSTERED KEY

在ADB中,CLUSTERED KEY:聚集索引,定义表中的排序列,聚集索引中键值的逻辑顺序决定了表中相应行的物理顺序。 GaussDB (DWS)不支持该属性修改表定义信息,DSC迁移时会将该关键字删除。

输入示例

1
2
3
4
5
6
DROP TABLE IF EXISTS unsupport_parse_test;
CREATE TABLE `unsupport_parse_test` (
    `username` int,
     clustered key clustered_key(shopid ASC, datetype ASC)
);
DROP TABLE IF EXISTS unsupport_parse_test;

输出示例

1
2
3
4
5
DROP TABLE IF EXISTS "public"."unsupport_parse_test";
CREATE TABLE "public"."unsupport_parse_test" (
  "username" INTEGER
) WITH (ORIENTATION = ROW, COMPRESSION = NO) NOCOMPRESS DISTRIBUTE BY HASH ("username");
DROP TABLE IF EXISTS "public"."unsupport_parse_test";
support.huaweicloud.com/tg-dws/dws_16_0127.html