打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
mysql 数据库TPCC测试
userphoto

2021.01.09

关注

创建数据库tpcc,导入测试表格

mysql -h 192.168.0.202 -P15002 -utest -ptest -e "drop database tpcc;"

mysql -h 192.168.0.202 -P15002 -utest -ptest -e "create database tpcc;"
mysql -h192.168.0.202 -P15002 -utest -ptest --database=tpcc < create_table.sql
mysql -h 192.168.0.202 -P15002 -utest -ptest -e "show databases;use tpcc;show tables;"

[root@tdsql1 tpcc_groupshard]# mysql -h 192.168.0.202 -P15002 -utest -ptest -e "create database tpcc;"[root@tdsql1 tpcc_groupshard]# mysql -h192.168.0.202 -P15002 -utest -ptest --database=tpcc < create_table.sql[root@tdsql1 tpcc_groupshard]# mysql -h 192.168.0.202 -P15002 -utest -ptest -e "show databases;use tpcc;show tables;"+--------------------+| Database           |+--------------------+| information_schema || mysql              || performance_schema || sys                || sysdb              || test               || tpcc               || xa                 |+--------------------++----------------+| Tables_in_tpcc |+----------------+| customer       || district       || history        || item           || new_orders     || order_line     || orders         || stock          || warehouse      |+----------------+

导入item表

tpcc_load: 
Usage: tpcc_load -h server_host -P port -d database_name -u mysql_user -p mysql_password -w warehouses -l part -m min_wh -n max_wh
* [part]: 1=ITEMS 2=WAREHOUSE 3=CUSTOMER 4=ORDERS


./tpcc_load -h 192.168.0.202 -P15002 -d tpcc -utest -ptest -w 2 -l 1 -m 1 -n 100

mysql -h 192.168.0.202 -P15002 -utest -ptest -e "use tpcc;select count(*) from item;"

[root@tdsql1 tpcc_groupshard]# ./tpcc_load -h 192.168.0.202 -P15002 -d tpcc -utest -ptest -w 2 -l 1 -m 1 -n 100**************************************** TPCC-mysql Data Loader        ****************************************option h with value '192.168.0.202'option P with value '15002'option d with value 'tpcc'option u with value 'test'option p with value 'test'option w with value '2'option l with value '1'option m with value '1'option n with value '100'<Parameters>     [server]: 192.168.0.202     [port]: 15002     [DBname]: tpcc       [user]: test       [pass]: test  [warehouse]: 2  [part(1-4)]: 1     [MIN WH]: 1     [MAX WH]: 100TPCC Data Load Started...Loading Item.................................................. 5000.................................................. 10000.................................................. 15000.................................................. 20000.................................................. 25000.................................................. 30000.................................................. 35000.................................................. 40000.................................................. 45000.................................................. 50000.................................................. 55000.................................................. 60000.................................................. 65000.................................................. 70000.................................................. 75000.................................................. 80000.................................................. 85000.................................................. 90000.................................................. 95000.................................................. 100000Item Done....DATA LOADING COMPLETED SUCCESSFULLY.[root@tdsql1 tpcc_groupshard]# mysql -h 192.168.0.202 -P15002 -utest -ptest -e "use tpcc;select count(*) from item;"+----------+| count(*) |+----------+|   100000 |+----------+[root@tdsql1 tpcc_groupshard]#

导入8张表
 ./load_data.sh tpcc  192.168.0.202  15002 test test 1 2 2 

测试

 ./tpcc_start -h 192.168.0.202,192.168.0.203 -P 15002 -d tpcc -u test -p test -w   2  -c 2 -r 120 -l 300 -i 1

[root@tdsql1 tpcc_groupshard]# ./tpcc_start -h 192.168.0.202,192.168.0.203 -P 15002 -d tpcc -u test -p test -w 2 -c 2 -r 120 -l 300 -i 1****************************************** ###easy### TPC-C Load Generator ******************************************option h with value '192.168.0.202,192.168.0.203'option P with value '15002'option d with value 'tpcc'option u with value 'test'option p with value 'test'option w with value '2'option c with value '2'option r with value '120'option l with value '300'
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
诚之和:如何理解MySQL用户中的百分号%是否包含localhost
Apache Sentry安装及简单使用
一.MySQL入门基础
Mysql中文乱码问题完美解决方案
Openfire使用上的一些技巧
druid:保存监控记录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服