tpcc-mysql 安装及使用

一、 安装

1、 下载.tar包的tpcc-mysql

2、 上传到服务器(rz)

3、 解压(tar -zxvf tpcc-mysql-src.tar)

二、 准备数据库

进入数据库,运行create_table.sql,add_fkey_idx.sql这两张表(这两张表通过tpcc-mysql解压获取)

三、 使用ttpc_load灌入测试数据(灌入仓库时间有点长)

tpcc_load host 'dbname' username password warehouse

(warehouse指要创建的仓库数量)

四、 开始测试

tpcc_start -h host  -Pport -d dbname -u username -p password  -w 10 -c 10 -r 300 -l 1800

-d 测试库

-u 用户名

-p 密码

-w 使用多少个数据仓库

-c 测试的并发数

-r 预热几秒

-l 运行测试多长时间

(如果需要删除已创建的表,这个时候drop_cons.sql就有用了)

原文地址:https://www.cnblogs.com/youlanda/p/9415354.html