tpcc Benchmark测试
1、创建用户及表结构
-- sqlTableCreates_DM脚本内容如下:
/*
DROP USER "BENCHMARKSQL" CASCADE;
DROP TABLESPACE BENCHMARKSQL1;
*/CREATE TABLESPACE BENCHMARKSQL1 DATAFILE 'BENCHMARKSQL1.dbf' SIZE 10000;
CREATE USER "BENCHMARKSQL" IDENTIFIED BY "123456789" DEFAULT TABLESPACE "BENCHMARKSQL1";
GRANT DBA TO BENCHMARKSQL;alter tablespace "ROLL" resize datafile 'ROLL.DBF' to 10000;
alter database resize logfile 'DAMENG01.log' to 10000;
alter database resize logfile 'DAMENG02.log' to 10000;create table BENCHMARKSQL.bmsql_config (cfg_name varchar(30) cluster primary key,cfg_value varchar(50)
);create table BENCHMARKSQL.bmsql_warehouse (w_id integer not null,w_ytd float,w_tax float,w_name varchar(10),w_street_1 varchar(20),w_street_2 varchar(20),w_city varchar(20),w_state char(2),w_zip char(9),cluster primary key(w_id)
)STORAGE(FILLFACTOR 1);create table BENCHMARKSQL.bmsql_district (d_w_id integer not null,d_id integer not null,d_ytd float,d_tax float,d_next_o_id integer,d_name varchar(10),d_street_1 varchar(20),d_street_2 varchar(20),d_city varchar(20),d_state char(2),d_zip char(9),
cluster primary key(d_w_id, d_id)
)STORAGE(FILLFACTOR 1);create table BENCHMARKSQL.bmsql_customer (c_w_id integer not null,c_d_id integer not null,c_id integer not null,c_discount float,c_credit char(2),c_last varchar(16),c_first varchar(16),c_credit_lim float,c_balance float,c_ytd_payment float,c_payment_cnt integer,c_delivery_cnt integer,c_street_1 varchar(20),c_street_2 varchar(20),c_city varchar(20),c_state char(2),c_zip char(9),c_phone char(16),c_since timestamp,c_middle char(2),c_data varchar(500),cluster primary key(c_w_id, c_d_id, c_id)
);create table BENCHMARKSQL.bmsql_history (hist_id integer,h_c_id integer,h_c_d_id integer,h_c_w_id integer,h_d_id integer,h_w_id integer,h_date timestamp,h_amount float,h_data varchar(24)
)storage(branch(32,32),without counter);create table BENCHMARKSQL.bmsql_oorder (o_w_id integer not null,o_d_id integer not null,o_id integer not null,o_c_id integer,o_carrier_id integer,o_ol_cnt float,o_all_local float,o_entry_d timestamp,cluster primary key(o_w_id, o_d_id, o_id)
)storage(without counter);create table BENCHMARKSQL.bmsql_new_order (no_w_id integer not null,no_d_id integer not null,no_o_id integer not null,cluster primary key(no_w_id, no_d_id, no_o_id)
)storage(without counter);create table BENCHMARKSQL.bmsql_order_line (ol_w_id integer not null,ol_d_id integer not null,ol_o_id integer not null,ol_number integer not null,ol_i_id integer not null,ol_delivery_d timestamp,ol_amount float,ol_supply_w_id integer,ol_quantity float,ol_dist_info char(24),cluster primary key(ol_w_id, ol_d_id, ol_o_id, ol_number)
)storage(without counter);create table BENCHMARKSQL.bmsql_stock (s_w_id integer not null,s_i_id integer not null,s_quantity float,s_ytd float,s_order_cnt integer,s_remote_cnt integer,s_data varchar(50),s_dist_01 char(24),s_dist_02 char(24),s_dist_03 char(24),s_dist_04 char(24),s_dist_05 char(24),s_dist_06 char(24),s_dist_07 char(24),s_dist_08 char(24),s_dist_09 char(24),s_dist_10 char(24),
cluster primary key(s_w_id, s_i_id)
);create table BENCHMARKSQL.bmsql_item (i_id integer not null,i_name varchar(24),i_price float,i_data varchar(50),i_im_id integer,cluster primary key(i_id)
);
注1:DECIMAL类型都改为FLOAT类型
注2:去掉外键
注3:主键强制聚集
注4:without counter表示关闭计数器
注5:Count时会把所有数据读入内存
注6:benchmarksql.bmsql_warehouse和benchmarksql.bmsql_district的storage(fillfactor 2,without counter);
注7:benchmarksql.bmsql_history改为list表,且storage(branch(32,32),without counter)
注8:其它表storage(without counter)
2、扩redo和undo日志
alter tablespace "ROLL" resize datafile 'ROLL.DBF' to 10000;
alter database resize logfile 'DAMENG01.log' to 20000;
alter database resize logfile 'DAMENG02.log' to 20000;
3、装载数据
运行以下命令装载100个仓库数据
./runLoader.sh props.dm
4、创建索引和序列
./runSQL.sh props.dm sqlIndexCreates_DM
-- sqlIndexCreates_DM脚本内容如下:
create index ndx_customer_name on BENCHMARKSQL.bmsql_customer (c_w_id, c_d_id, c_last, c_first);
create or replace procedure BENCHMARKSQL.createsequence
asn int;stmt1 varchar(200);begin select count(*)+1 into n from BMSQL_history;if(n != 1) thenselect max(hist_id) + 1 into n from BMSQL_history;end if;PRINT n;stmt1:='create sequence hist_id_seq start with '||n||' MAXVALUE 9223372036854775807 CACHE 50000;';EXECUTE IMMEDIATE stmt1;
end;call BENCHMARKSQL.createsequence;
alter table BENCHMARKSQL.bmsql_history modify hist_id integer default (BENCHMARKSQL.hist_id_seq.nextval);
5、数据预装载
--测试前执行如下SQL:
--item表,8K的页,需要占用1300页
SP_SET_TAB_FAST_POOL_FLAG('BENCHMARKSQL', 'BMSQL_ITEM', 1);
SP_SET_TAB_FAST_POOL_FLAG('BENCHMARKSQL', 'BMSQL_WAREHOUSE', 1);
SP_SET_TAB_FAST_POOL_FLAG('BENCHMARKSQL','BMSQL_DISTRICT', 1);
--内存充足的情况下可以执行下面的语句,把数据预加载到内存。内存不足情况下,优先舍弃BMSQL_HISTORY(去掉下面语句中对BMSQL_HISTORY表的统计)
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";
6、执行测试
--修改props.dm将用户名密码换成BENCHMARKSQL用户的
--props.dm脚本内容如下:
driver=dm.jdbc.driver.DmDriver
conn=jdbc:dm://192.168.197.101:5236
user=BENCHMARKSQL
password=123456789
warehouses=100
terminals=100
runMins=10
runTxnsPerTerminal=0
limitTxnsPerMin=0
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
7、开始测试
--执行命令如下:
./runBenchmark.sh props.dm
达梦在线服务平台
tpcc Benchmark测试相关推荐
- 数据库TPCC benchmark测试工具对比
TPCC home: http://www.tpc.org/tpcc/default.asp 怎样进行数据库性能测试:http://www.51testing.com/html/80/n-841780 ...
- 聊聊Benchmark测试【转载】
根据wiki百科解释: beanchmark问题就是基准测试问题. 1996 International Workshop on Structural Control 会议上提议组建欧洲.亚洲.和美国 ...
- benchmark测试
title: benchmark测试 date: 2021-12-20 17:44:59 categories: go tags: 测试 Go 中的基准测试在许多方面类似于单元测试,但有关键的不同之处 ...
- 在线ssd测试软件,AS SSD Benchmark测试
AS SSD Benchmark测试 ● AS SSD Benchmark AS SSD是基于全方位性能的测试软件,它使用了非常深度的Queue Depth(QD)队列深度,以及非压缩测试. • AS ...
- 聊聊benchmark测试
根据wiki百科解释: benchmark问题就是基准测试问题. 1996 International Workshop on Structural Control 会议上提议组建欧洲.亚洲.和美国3 ...
- AI Benchmark测试原理、v4测试项变化以及榜单数据解读
田海立@csdn 2020-10-3 AI Benchmark这里特指ETHZ(苏黎世联邦理工学院)的AI性能评测工具.最新其发布了v4版本以及基于这个版本的soc和手机AI性能数据.本文分析了AI ...
- Centos7安装ab(Apache Benchmark)测试工具及使用
Centos7安装ab(Apache Benchmark)测试工具及使用 Apache Benchmark简称AB 一.安装 yum install -y httpd-tools 二.创建Post请求 ...
- 安装tpcc mysql_MySQL:安装tpcc 标准测试包
安装tpcc 标准测试包(git) git代码库位置: https://github.com/Percona-Lab/tpcc-mysql 1. 安装git客户端,可以用yum,省.....50字 2 ...
- 干货 | 如何对京东云GPU云主机进行TensorFlow Benchmark测试
摘 要 本文介绍基于京东云GPU云主机快速搭建基于Tensorflow深度学习平台的过程,并分享如何利用Tensorflow benchmark工具进行GPU云主机基准性能测试,帮助读者快速.经 ...
最新文章
- 快速记忆python函数-【速学速记】Python 高阶函数
- ML之SVM:利用SVM算法(超参数组合进行多线程网格搜索+3fCrVa)对20类新闻文本数据集进行分类预测、评估
- Javascript设计模式之——代理模式
- 【BZOJ1085】迭代加深+启发式搜索
- open cv+C++错误及经验总结(十一)
- ip地址聚合后可用地址数 计算机网络技术三级考试 备考
- 城里人看呆!没想到现在景区都这么会玩了
- python识别条形码_用 Python 和 OpenCV 检测图片上的条形码
- 对话职业经理人阿朱:程序员转型期的职业选择
- Win10、Win11打开远程桌面连接方法
- 广东高考成绩及录取分数线揭晓
- linux磁盘阵列配置,Linux下配置磁盘阵列
- 群晖ds216j如何安装迅雷软件
- 在centos7中下载搜狗输入法
- 童牧野中国十年股市十大名人 主要书籍著作及论宝塔线
- 架构解密:从分布式到微服务pdf
- 计算机常用文件夹怎么关,win7系统隐藏最近使用的文件和常用文件夹的处理步骤...
- flutter最简单的天气预报
- 【python实战】--图片像素动漫化
- 撸啊撸,再次撸HashMap源码,踩坑源码中构造方法!!!每次都有收获