Skip to content

[哈希分片]WEEK

lightfish edited this page Nov 30, 2020 · 2 revisions

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

WEEK

仅用于分表

仅DATE/DATETIME

一周之中的星期(1-7)进行取余运算

tbpartitions不超过7

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