0x1 tpcc
导入一亿数据,其中最大表是10w,实际最大数据量:最大表 x warehouses的值
tiup bench tpcc -H 192.168.10.150 -P 4000 -p xxx -D tpcc --warehouses 1000 prepare
导入1千万数据, warehouses 设置 100 即可
tiup bench tpcc -H 192.168.10.150 -P 4000 -p xxx -D tpcc_1000 --warehouses 100 prepare
压测影响因素: 线程数、分区表
0x2 tpch
前置配置:
set @@tidb_isolation_read_engines='tiflash';
set @@tidb_allow_mpp=1;
set @@tidb_mem_quota_query = 10 << 30;
# 不开启的话并行导入会有问题
SET GLOBAL tidb_multi_statement_mode='ON';
导入数据
tiup bench tpch -H 192.168.10.150 -P 4000 -p 'xxx' -D tpch_1000 --dropdata --sf=4 --analyze --tiflash prepare
查询表flash同步状态
SELECT * FROM information_schema.tiflash_replica WHERE TABLE_SCHEMA = 'tpch_1000' and TABLE_NAME = 'lineitem'
测试
tiup bench tpch -H 192.168.10.150 -P 4000 -p 'xxx' -D tpch_1000 --sf 10 --time 1800s -T 64 run
评论