写热点打散方式
insert 无主键: alter table table_name shard_row_id_bits=n;
有主键: alter table t modify a bigint auto_random(5);
update alter table t modify a bigint auto_random(5);
delete alter table t modify a bigint auto_random(5);
index split table table_name index idx_name between () and () regions n;
读热点打散(顺序增长属性字段索引范围扫描)
方式1:
set config tikv split.qps-threshold=3000
set config tikv split.byte-threshold=30
或者:
curl -X POST “http://ip:status_port/config”-H “accept:application/json”-d (“split.qps-threshold”:“3000”)’
curl -X POST “http://ip:status_port/config”-H “accept:application/json”-d (“split.byte-threshold”:“30”)
方式2:
SPLIT TABLE table_name INDEX idx_name BETWEEN()AND (REGIONS n;