目录
利用TPCC测试工具BENCHMARKSQL,测试单机10warehouse的性能
建用户,表空间,表
执行数据装载工具装载数据
A.run下更改配置文件props.dm
B.装载数据./runLoader.sh props.dm numWarehouses 10
C.查看载入后的数据量
D.插入索引bms5_index.sql
执行测试
A.执行./runBenchmark.sh props.dm
B.查看日志run下
C.验证
注意:
db=kingbase
#该项不修改(以金仓为例)
driver=com.kingbase.Driver
#修改成数据库JDBC文件的Driver寻找路径
conn=jdbc:kingbase://192.168.1.1:54321/TPCC
#修改数据库链接名,IP、端口和实例名
user=TPCC
#修改数据库用户名
password=11111111
#修改该数据库用户名的密码
warehouses=200
#仓库数量,一个仓库为70+MB左右,200个大概为16G不到
loadWorkers=4
#使用多少条线程创建仓库,可按CPU核心数设置
terminals=1\3\5\10
#每个仓库多少台终端,总的终端数=仓库数X终端数
runTxnsPerTerminal=0
#规定每台终端执行多少个事件就结束测试(与下一条同时有一个必须为0)
runMins=60
#规定测试多少分钟就结束测试(与上一条同时有一个必须为0)
limitTxnsPerMin=100000
#修改限制的每分钟处理事务数值
#其他选项可不修改
select count(*) from "BENCHMARKSQL"."BMSQL_CUSTOMER" union all
select count(*) from "BENCHMARKSQL"."BMSQL_DISTRICT" union all
select count(*) from "BENCHMARKSQL"."BMSQL_ITEM" union all
select count(*) from "BENCHMARKSQL"."BMSQL_NEW_ORDER" union all
select count(*) from "BENCHMARKSQL"."BMSQL_OORDER" union all
select count(*) from "BENCHMARKSQL"."BMSQL_ORDER_LINE" union all
select count(*) from "BENCHMARKSQL"."BMSQL_STOCK" union all
select count(*) from "BENCHMARKSQL"."BMSQL_WAREHOUSE" union all
select count(*) from "BENCHMARKSQL"."BMSQL_HISTORY" union all
select count("C_PAYMENT_CNT") from "BENCHMARKSQL"."BMSQL_CUSTOMER";
(Select w_id, w_ytd from bmsql_warehouse) except(select d_w_id, sum(d_ytd) from dmdistrict group by d_w_id);
(Select d_w_id, d_id, D_NEXT_O_ID - 1 from district) except (select o_w_id, o_d_id, max(o_id) from oorder group by o_w_id, o_d_id);
(Select d_w_id, d_id, D_NEXT_O_ID - 1 from district) except (select no_w_id, no_d_id, max(no_o_id) from new_order group by no_w_id, no_d_id);
select * from (select (count(no_o_id)-(max(no_o_id)-min(no_o_id)+1)) as diff from new_order group by no_w_id, no_d_id) where diff != 0;
(select o_w_id, o_d_id, sum(o_ol_cnt) from oorder group by o_w_id, o_d_id) except (select ol_w_id, ol_d_id, count(ol_o_id) from order_line group by ol_w_id, ol_d_id);
(select d_w_id, sum(d_ytd) from district group by d_w_id) except(Select w_id, w_ytd from warehouse);
#结果集全为空,连接到数据库做以上查询,如果结果全为0行,则说明tpcc库是一致的,否则说明此库在运行过程中数据出现混乱。
# bmsql_history 表新增的记录数20637,bmsql_history 表增加的数据约等于transaction count * 43%= 47995*43%=20637.85
达梦数据库 - 新一代大型通用关系型数据库 | 达梦在线服务平台