创建列存储分区表 本页介绍天翼云TeleDB数据库创建列存储分区表的语法。 列存储引擎中分区表主表作为逻辑表仍是行存结果,实际存储数据的分区表需要指定使用USING PAX 命令创建,创建一个 HASH 分区的列存储分区表如下: teledb create table testhash ( teledb( "userid" int4 not null, teledb( "name" varchar(64)) teledb partition by hash(userid); CREATE TABLE teledb create table testhashc1 partition of testhash for values WITH (modulus 4, remainder 0) using pax; CREATE TABLE teledb create table testhashc2 partition of testhash for values WITH (modulus 4, remainder 1) using pax; CREATE TABLE teledb create table testhashc3 partition of testhash for values WITH (modulus 4, remainder 2) using pax; CREATE TABLE teledb create table testhashc4 partition of testhash for values WITH (modulus 4, remainder 3) using pax; CREATE TABLE teledb d+ testhash Table "public.testhash" Column Type Collation Nullable Default Storage Stats target Description +++++++ userid integer not null plain name character varying(64) extended Partition key: HASH (userid) Partitions: testhashc1 FOR VALUES WITH (modulus 4, remainder 0), testhashc2 FOR VALUES WITH (modulus 4, remainder 1), testhashc3 FOR VALUES WITH (modulus 4, remainder 2), testhashc4 FOR VALUES WITH (modulus 4, remainder 3) Distribute By: HASH(userid) Location Nodes: ALL DATANODES