分布式数据库中间件 DDM-WEEK按星期哈希:建表语法

时间:2025-02-24 20:32:05

建表语法

create table test_week_tb (    
    id int, 
    name varchar(30) DEFAULT NULL,  
    create_time datetime DEFAULT NULL,
    primary key(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 
dbpartition by HASH(name) 
tbpartition by WEEK(create_time) tbpartitions 7;
support.huaweicloud.com/usermanual-ddm/ddm_10_0017.html