概述
因为TPCH v3.0原生只支持DB2, INFORMIX, ORACLE, SQLSERVER, SYBASE, TDAT,VECTORWISE 等OLAP的数据库,如果要使用TPCH测试ClickHouse,需要在原有的8张表结构上做语法修改,使其满足CK的语法要求; 便人便己,修改后如下
create table lineitem ( l_orderkey bigint,
l_partkey bigint,
l_suppkey bigint,
l_linenumber bigint,
l_quantity decimal(15,2) ,
l_extendedprice decimal(15,2) ,
l_discount decimal(15,2) ,
l_tax decimal(15,2) ,
l_returnflag char(1) ,
l_linestatus char(1) ,
l_shipdate date ,
l_commitdate date ,
l_receiptdate date ,
l_shipinstruct char(25) ,
l_shipmode char(10) ,
l_comment varchar(44) )engine=MergeTree
order by (l_shipdate,l_returnflag,l_linestatus);
create table nation ( n_nationkey bigint,
n_name char(25) ,
n_regionkey bigint,
n_comment varchar(152))engine=MergeTree order by (n_name,n_regionkey);
create table region ( r_regionkey bigint,
r_name char(25) ,
r_comment varchar(152))engine=MergeTree order by (r_name);
create table part ( p_partkey bigint,
p_name varchar(55) ,
p_mfgr char(25) ,
p_brand char(10) ,
p_type varchar(25) ,
p_size bigint,
p_container char(10) ,
p_retailprice decimal(15,2) ,
p_comment varchar(23) )engine=MergeTree order by (p_name,p_mfgr);
create table supplier ( s_suppkey bigint,
s_name char(25) ,
s_address varchar(40) ,
s_nationkey bigint,
s_phone char(15) ,
s_acctbal decimal(15,2) ,
s_comment varchar(101) )engine=MergeTree order by (s_suppkey,s_name);
create table partsupp ( ps_partkey bigint,
ps_suppkey bigint,
ps_availqty bigint,
ps_supplycost decimal(15,2) ,
ps_comment varchar(199) )engine=MergeTree order by (ps_partkey,ps_suppkey);
create table customer ( c_custkey bigint,
c_name varchar(25) ,
c_address varchar(40) ,
c_nationkey bigint,
c_phone char(15) ,
c_acctbal decimal(15,2) ,
c_mktsegment char(10) ,
c_comment varchar(117) )engine=MergeTree order by (c_custkey,c_name);
create table orders ( o_orderkey bigint,
o_custkey bigint,
o_orderstatus char(1) ,
o_totalprice decimal(15,2) ,
o_orderdate date ,
o_orderpriority char(15) ,
o_clerk char(15) ,
o_shippriority bigint,
o_comment varchar(79) )engine=MergeTree order by (o_orderkey,o_custkey);
最后
以上就是孤独小丸子为你收集整理的TPCH 测试ClickHouse表结构的全部内容,希望文章能够帮你解决TPCH 测试ClickHouse表结构所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复