mysql 数据库TPCC测试

举报
snowofsummer 发表于 2020/12/14 15:42:26 2020/12/14
【摘要】 创建数据库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.sqlmysql -h 192.168.0.202 -P15002 -...

创建数据库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]: 100
TPCC Data Load Started...
Loading Item
.................................................. 5000
.................................................. 10000
.................................................. 15000
.................................................. 20000
.................................................. 25000
.................................................. 30000
.................................................. 35000
.................................................. 40000
.................................................. 45000
.................................................. 50000
.................................................. 55000
.................................................. 60000
.................................................. 65000
.................................................. 70000
.................................................. 75000
.................................................. 80000
.................................................. 85000
.................................................. 90000
.................................................. 95000
.................................................. 100000
Item 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'











【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。