1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| CREATE TABLE mkt.t_fac_member_mails
(
ibroadlogid integer NOT NULL,
ideliveryid integer NOT NULL,
memberid integer NOT NULL,
siteid integer NOT NULL,
mail_id_quot integer NOT NULL,
istatus smallint NOT NULL,
histoloadid integer NOT NULL
)
WITH (
OIDS=FALSE
)
DISTRIBUTED BY (ibroadlogid, ideliveryid, memberid, mail_id_quot)
PARTITION BY RANGE(mail_id_quot)
(
START (20120301) END (20120331) INCLUSIVE WITH (appendonly=false),
START (20120401) END (20120430) INCLUSIVE WITH (appendonly=false),
START (20120501) END (20120531) INCLUSIVE WITH (appendonly=false),
START (20120601) END (20120630) INCLUSIVE WITH (appendonly=false),
START (20120701) END (20120731) INCLUSIVE WITH (appendonly=false),
START (20120801) END (20120831) INCLUSIVE WITH (appendonly=false),
START (20120901) END (20120930) INCLUSIVE WITH (appendonly=false),
START (20121001) END (20121031) INCLUSIVE WITH (appendonly=false),
START (20121101) END (20121130) INCLUSIVE WITH (appendonly=false),
START (20121201) END (20121231) INCLUSIVE WITH (appendonly=false),
DEFAULT PARTITION other WITH (appendonly=false)
)
;
ALTER TABLE mkt.t_fac_member_mails OWNER TO group_owner_prod;
GRANT ALL ON TABLE mkt.t_fac_member_mails TO group_owner_prod;
GRANT SELECT ON TABLE mkt.t_fac_member_mails TO g_pr_mkt_r; |
Partager