s:
events (avg/stddev): 625.0000/10.07
execution time (avg/stddev): 12.7951/0.01
例子3:更复杂的测试 #--oltp-point-selects:在一个事务里面Point select的数量,默认为10
#--oltp-range-size:range查询的范围大小,默认100,应该小于oltp-table-size
#--oltp-index-updates:在单个事务中index update的数量,默认1
#--max-time:限制最大的整体执行时间(秒)
$ sysbench --test=sysbench/sysbench/sysbench/tests/db/oltp.lua --oltp-tables-count=4 --oltp-table-size=500000 --oltp-test-mode=complex ?mysql-user=root --mysql-password=password --num-threads=16 --oltp-point-selects=1000 --oltp-range-size=1000 --oltp-index-updates=1000 --max-time=300 run
Number of threads: 16
OLTP test statistics:
queries performed:
read: 5803120
write: 2015732
other: 7585
total: 7826437
transactions: 1805 (5.98 per sec.)
deadlocks: 3975 (13.18 per sec.)
read/write requests: 7818852 (25916.23 per sec.)
other operations: 7585 (25.14 per sec.)
General statistics:
total time: 301.6972s
total number of events: 1805
total time taken by event execution: 4815.5190s
response time:
min: 383.54ms
avg: 2667.88ms
max: 18964.65ms
approx. 95 percentile: 6059.93ms
Threads fairness:
events (avg/stddev): 112.8125/6.89
execution time (avg/stddev): 300.9699/0.48
查询的类型 单记录查询 SELECT c FROM sbtest WHERE id=N 索引列UPDATE UPDATE sbtest SET k=k+1 WHERE id=N 非索引列UPDATE UPDATE sbtest SET c=N WHERE id=M 范围查询 SELECT c FROM sbtest WHERE id BETWEEN N AND M SUM()范围查询 SELECT SUM(k) FROM sbtest WHERE id between N and M ORDER BY范围查询 SELECT c FROM sbtest WHERE id between N and M ORDER BY c DISTINCT范围查询 SELECT DISTINCT c FROM sbtest WHERE id BETWEEN N and M ORDER BY c
|