Skip to content

[哈希分片]YYYYMM

jamie12221 edited this page Nov 29, 2020 · 1 revision

[数据分片]HASH型分片算法-YYYYMM

YYYYMM

仅用于分库

(YYYY*12+MM)%分库数

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