阅读(3954) (16)

Mycat2 哈希分片 YYYYDD

2021-09-08 14:01:12 更新

YYYDD

仅用于分库

DD是一年之中的天数

(YYYY*366+DD)%分库数

create table travelrecord (
 ....
) ENGINE=InnoDB DEFAULT CHARSET=utf8 
dbpartition by YYYYMM(xxx) dbpartitions 8
tbpartition by xxx(xxx) tbpartitions 12;