pgsql 分割槽建表
阿新 • • 發佈:2018-12-26
pgsql 分割槽建表sql
create table tf_project_daily_consumer_detail( org_skey text, org_code text, org_name text, daily_consumer_amount text, daily_consumer_member_num text, daily_consumer_order_num text, insert_day text, attr1 text, attr2 text, attr3 text, attr4 text, attr5 text, attr6 text, attr7 text, attr8 text, attr9 text, attr10 text, attr11 text, attr12 text, attr13 text, attr14 text, attr15 text, attr16 text, attr17 text, attr18 text, attr19 text, attr20 text ) with (compresstype=snappy, appendonly=true) distributed by (org_skey) partition by list(org_skey) ( partition "1" values ('1000000000'), partition "2" values ('6419453001'), partition "3" values ('5005326001'), partition "4" values ('7132207003'), partition "5" values ('5752207001'), partition "6" values ('7132207001'), partition "7" values ('1897282003'), partition "8" values ('5496857001'), partition "9" values ('5827147001'), partition "10" values ('6419453002'), partition "11" values ('5333409001'), partition "12" values ('5668965001'), partition "13" values ('6682238001'), partition "14" values ('7000982001'), partition "15" values ('6810970001'), partition "16" values ('6075576001'), partition "17" values ('5922641001'), partition "18" values ('4493714007'), partition "19" values ('6552082001'), partition "20" values ('4827062001'), partition "21" values ('5584575001'), partition "22" values ('5912942001'), partition "23" values ('5984618001'), partition "24" values ('7132207002'), partition "25" values ('5239765001'), partition "26" values ('4725320001'), partition "27" values ('6277188001'), partition "28" values ('7490442001'), partition "29" values ('9733806001'), partition "30" values ('9733806009'), default partition na )