当前位置:网站首页>2022-07-05 使用tpcc对stonedb进行子查询测试
2022-07-05 使用tpcc对stonedb进行子查询测试
2022-07-06 14:28:00 【帝尊悟世】
目录
摘要:
记录使用tpcc对stonedb进行压测流程
tpcc:
一. 编译
git clone https://github.com/Percona-Lab/tpcc-mysql.git
cd tpcc-mysql/src
make
cd ..
#由于我们测试的是STONEDB引擎,所以需要修改create_table.sql里面的表结构引擎为Atomstore
vim create_table.sql
:%s/InnoDB/STONEDB/g
二. 创建tpcc库
mysql -e “create database tpcc”
三. 导入修改过引擎的表结构:
mysql tpcc < create_table.sql
四. 导入数据
ln -s /stonedb56/install/tmp/mysql.sock /var/lib/mysql/mysql.sock
./tpcc_load -h localhost -d tpcc -u root -P 3306 -w 10
五. 执行测试:
./tpcc_start -h localhost -d tpcc -u root -P 3306 -w 10 -c32 -r10 -l60
六. 测试数据:
MEASURING START.
10, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
20, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
30, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
40, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
50, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
60, trx: 0, 95%: 0.000, 99%: 0.000, max_rt: 0.000, 0|0.000, 0|0.000, 0|0.000, 0|0.000
STOPPING THREADS
<Raw Results>
[0] sc:0 lt:0 rt:0 fl:0 avg_rt: -nan (5)
[1] sc:0 lt:0 rt:0 fl:0 avg_rt: -nan (5)
[2] sc:0 lt:0 rt:0 fl:0 avg_rt: -nan (5)
[3] sc:0 lt:0 rt:0 fl:0 avg_rt: -nan (80)
[4] sc:0 lt:0 rt:0 fl:0 avg_rt: -nan (20)
in 60 sec.
<Raw Results2(sum ver.)>
[0] sc:0 lt:0 rt:0 fl:0
[1] sc:0 lt:0 rt:0 fl:0
[2] sc:0 lt:0 rt:0 fl:0
[3] sc:0 lt:0 rt:0 fl:0
[4] sc:0 lt:0 rt:0 fl:0
<Constraint Check> (all must be [OK])
[transaction percentage]
Payment: -nan% (>=43.0%) [NG] *
Order-Status: -nan% (>= 4.0%) [NG] *
Delivery: -nan% (>= 4.0%) [NG] *
Stock-Level: -nan% (>= 4.0%) [NG] *
[response time (at least 90% passed)]
New-Order: -nan% [NG] *
Payment: -nan% [NG] *
Order-Status: -nan% [NG] *
Delivery: -nan% [NG] *
Stock-Level: -nan% [NG] *
<TpmC>
0.000 TpmC
子查询:
查询语句:
select
o_carrier_id,
count(*) as order_count
from
orders
where
o_entry_d >= date '1993-07-01'
and o_entry_d < date '2022-07-06' + interval '3' month
and exists (
select
*
from
item
where
i_name = i_data
or i_id > i_price
)
group by
o_carrier_id
order by
o_carrier_id;
stonedb执行结果:
mysql> select
-> o_carrier_id,
-> count(*) as order_count
-> from
-> orders
-> where
-> o_entry_d >= date '1993-07-01'
-> and o_entry_d < date '2022-07-06' + interval '3' month
-> and exists (
-> select
-> *
-> from
-> item
-> where
-> i_name = i_data
-> or i_id > i_price
-> )
-> group by
-> o_carrier_id
-> order by
-> o_carrier_id;
+--------------+-------------+
| o_carrier_id | order_count |
+--------------+-------------+
| NULL | 90000 |
| 1 | 21113 |
| 2 | 20850 |
| 3 | 20965 |
| 4 | 20854 |
| 5 | 21050 |
| 6 | 21123 |
| 7 | 21028 |
| 8 | 21062 |
| 9 | 21015 |
| 10 | 20940 |
+--------------+-------------+
11 rows in set (0.26 sec)
mysql> explain select
-> o_carrier_id,
-> count(*) as order_count
-> from
-> orders
-> where
-> o_entry_d >= date '1993-07-01'
-> and o_entry_d < date '2022-07-06' + interval '3' month
-> and exists (
-> select
-> *
-> from
-> item
-> where
-> i_name = i_data
-> or i_id > i_price
-> )
-> group by
-> o_carrier_id
-> order by
-> o_carrier_id \G
*************************** 1. row ***************************
id: 1
select_type: PRIMARY
table: NULL
type: NULL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: NULL
Extra: Impossible WHERE
*************************** 2. row ***************************
id: 2
select_type: SUBQUERY
table: item
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 100000
Extra: Using where with pushed condition (t0) Pckrows: 2, susp. 2 (0 empty 0 full). Conditions: 1
2 rows in set (0.00 sec)
对比mysql的innodb引擎:
mysql版本:
[[email protected] ~]# mysqld --version
/usr/libexec/mysqld Ver 8.0.26 for Linux on x86_64 (Source distribution)
数据:
mysql> select
-> o_carrier_id,
-> count(*) as order_count
-> from
-> orders
-> where
-> o_entry_d >= date '1993-07-01'
-> and o_entry_d < date '2022-07-06' + interval '3' month
-> and exists (
-> select
-> *
-> from
-> item
-> where
-> i_name = i_data
-> or i_id > i_price
-> )
-> group by
-> o_carrier_id
-> order by
-> o_carrier_id;
+--------------+-------------+
| o_carrier_id | order_count |
+--------------+-------------+
| NULL | 90000 |
| 1 | 21218 |
| 2 | 20976 |
| 3 | 20727 |
| 4 | 21098 |
| 5 | 21084 |
| 6 | 20878 |
| 7 | 21114 |
| 8 | 20800 |
| 9 | 21265 |
| 10 | 20840 |
+--------------+-------------+
11 rows in set (0.11 sec)
mysql> explain select
-> o_carrier_id,
-> count(*) as order_count
-> from
-> orders
-> where
-> o_entry_d >= date '1993-07-01'
-> and o_entry_d < date '2022-07-06' + interval '3' month
-> and exists (
-> select
-> *
-> from
-> item
-> where
-> i_name = i_data
-> or i_id > i_price
-> )
-> group by
-> o_carrier_id
-> order by
-> o_carrier_id \G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: item
partitions: NULL
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 92192
filtered: 40.00
Extra: Using where; Using temporary; Using filesort; FirstMatch
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: orders
partitions: NULL
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 271048
filtered: 11.11
Extra: Using where; Using join buffer (hash join)
2 rows in set, 1 warning (0.00 sec)
边栏推荐
- Notes de développement du matériel (10): flux de base du développement du matériel, fabrication d'un module USB à RS232 (9): création de la Bibliothèque d'emballage ch340g / max232 SOP - 16 et Associa
- 基于LM317的可调直流电源
- MariaDB database management system learning (I) installation diagram
- Seata aggregates at, TCC, Saga and XA transaction modes to create a one-stop distributed transaction solution
- 2500个常用中文字符 + 130常用中英文字符
- 十二、启动流程
- A Mexican airliner bound for the United States was struck by lightning after taking off and then returned safely
- [10:00 public class]: basis and practice of video quality evaluation
- Problems in the process of opencv300 cmake generating project
- Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
猜你喜欢
第3章:类的加载过程(类的生命周期)详解
Write a rotation verification code annotation gadget with aardio
GPS从入门到放弃(十七) 、对流层延时
Assembly and interface technology experiment 5-8259 interrupt experiment
C # réalise la liaison des données du rapport Crystal et l'impression du Code à barres 4
嵌入式常用计算神器EXCEL,欢迎各位推荐技巧,以保持文档持续更新,为其他人提供便利
Attack and defense world ditf Misc
CCNA Cisco network EIGRP protocol
NetXpert XG2帮您解决“布线安装与维护”难题
GPS from getting started to giving up (XV), DCB differential code deviation
随机推荐
Bat script learning (I)
GPS从入门到放弃(十八)、多路径效应
Kohana 数据库
Spatial domain and frequency domain image compression of images
MariaDb数据库管理系统的学习(一)安装示意图
Xiaoman network model & http1-http2 & browser cache
GPS从入门到放弃(十一)、差分GPS
HDR image reconstruction from a single exposure using deep CNN reading notes
What is the difference between animators and animators- What is the difference between an Animator and an Animation?
Anaconda installs third-party packages
GPS from getting started to giving up (12), Doppler constant speed
ZABBIX proxy server and ZABBIX SNMP monitoring
2500个常用中文字符 + 130常用中英文字符
i.mx6ull搭建boa服务器详解及其中遇到的一些问题
zabbix 代理服务器 与 zabbix-snmp 监控
i. Mx6ull build boa server details and some of the problems encountered
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
GPS from entry to abandonment (XVII), tropospheric delay
A Mexican airliner bound for the United States was struck by lightning after taking off and then returned safely
PVL EDI 项目案例