mysql 简单测试(mysqlslap)

C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Pr
ogram Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --num
ber-int-cols=4 --auto-generate-sql --auto-generate-sql-load-type=update --engine
=myisam --number-of-queries=10000 -uroot -p8319999
update
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 16.187 seconds
        Minimum number of seconds to run all queries: 16.187 seconds
        Maximum number of seconds to run all queries: 16.187 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
read
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 5.703 seconds
        Minimum number of seconds to run all queries: 5.703 seconds
        Maximum number of seconds to run all queries: 5.703 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
write
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 1.765 seconds
        Minimum number of seconds to run all queries: 1.765 seconds
        Maximum number of seconds to run all queries: 1.765 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 7.968 seconds
        Minimum number of seconds to run all queries: 7.968 seconds
        Maximum number of seconds to run all queries: 7.968 seconds
        Number of clients running queries: 50
        Average number of queries per client: 1000
mixed:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 52.281 seconds
        Minimum number of seconds to run all queries: 52.281 seconds
        Maximum number of seconds to run all queries: 52.281 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 51.985 seconds
        Minimum number of seconds to run all queries: 51.985 seconds
        Maximum number of seconds to run all queries: 51.985 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Pr
ogram Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --cre
ate-schema=edu_591up --query="select userid from ol_user where username='zbwangc
[email protected]'" --number-of-queries=10000 -uroot -p8319999
Benchmark
        Average number of seconds to run all queries: 3.813 seconds
        Minimum number of seconds to run all queries: 3.813 seconds
        Maximum number of seconds to run all queries: 3.813 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Pr
ogram Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=10 --cr
eate-schema=edu_591up --query="select userid,username from ol_user where userid=
25091" --number-of-queries=10000 -uroot -p8319999
Benchmark
        Average number of seconds to run all queries: 1.746 seconds
        Minimum number of seconds to run all queries: 0.781 seconds
        Maximum number of seconds to run all queries: 1.954 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Pr
ogram Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=10 --cr
eate-schema=edu_591up --query="update ol_user set username='[email protected]'
where userid=25091" --number-of-queries=10000 -uroot -p8319999
Benchmark
        Average number of seconds to run all queries: 2.229 seconds
        Minimum number of seconds to run all queries: 1.969 seconds
        Maximum number of seconds to run all queries: 3.172 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Pr
ogram Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=10 --cr
eate-schema=edu_591up --query="insert into ol_user(username,password)values('ton
gchao','dddddddddddddddd')" --number-of-queries=10000 -uroot -p8319999
Benchmark
        Average number of seconds to run all queries: 8.992 seconds
        Minimum number of seconds to run all queries: 8.078 seconds
        Maximum number of seconds to run all queries: 9.750 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Program Files\MySQL\MySQL Server 5.1\scripts>mysqlslap --defaults-file="C:/Program Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="insert into ol_user(username,password)values('tongchao','dddddddddddddddd')" --number-of-queries=10000 -uroot -p8319999
Benchmark
        Average number of seconds to run all queries: 2.000 seconds
        Minimum number of seconds to run all queries: 2.000 seconds
        Maximum number of seconds to run all queries: 2.000 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
(无索引)
mysqlslap --defaults-file="C:/Program Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="insert into ol_user(username,password)values('tongchao','dddddddddddddddd')" --number-of-queries=10000 -uroot -p8319999
mysqlslap --defaults-file="C:/Program Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="update ol_user set password='tongchaotongchao' where userid = 13" --number-of-queries=10000 -uroot -p8319999
mysqlslap --defaults-file="C:/Program Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="select * from ol_user where userid = 13" --number-of-queries=10000 -uroot -p8319999
*******************************************************************************************************************************
mysqlslap --defaults-file="D:/MySQL/MySql5.5/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="insert into ol_user(username,password)values('tongchao','dddddddddddddddd')" --number-of-queries=10000 -uroot
mysqlslap --defaults-file="D:/MySQL/MySql5.5/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="update ol_user set password='tongchaotongchao' where userid = 13" --number-of-queries=100000 -uroot
mysqlslap --defaults-file="D:/MySQL/MySql5.5/my.ini" --concurrency=50 --iterations=1 --create-schema=edu_591up --query="select * from ol_user where userid = 13" --number-of-queries=10000 -uroot
二、自动测试
mysqlslap --defaults-file="C:/Program Files/MySQL/MySQL Server 5.1/my.ini" --concurrency=50 --iterations=1 --number-int-cols=4 --auto-generate-sql --auto-generate-sql-load-type=update --engine=myisam,innodb --number-of-queries=10000 -uroot -p8319999
mysqlslap --defaults-file="D:/MySQL/MySql5.5/my.ini" --concurrency=50 --iterations=1 --number-int-cols=4 --auto-generate-sql --auto-generate-sql-load-type=update --engine=myisam,innodb --number-of-queries=10000 -uroot
mysqlslap --defaults-file="C:/Program Files/MySQL/mysql-5.1.54-win32/my.ini" --concurrency=50 --iterations=1 --number-int-cols=4 --auto-generate-sql --auto-generate-sql-load-type=update --engine=myisam,innodb --number-of-queries=10000 -uroot
结果:
5.1
update:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 17.547 seconds
        Minimum number of seconds to run all queries: 17.547 seconds
        Maximum number of seconds to run all queries: 17.547 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 47.860 seconds
        Minimum number of seconds to run all queries: 47.860 seconds
        Maximum number of seconds to run all queries: 47.860 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
write:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 1.587 seconds
        Minimum number of seconds to run all queries: 0.766 seconds
        Maximum number of seconds to run all queries: 1.890 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 1.868 seconds
        Minimum number of seconds to run all queries: 1.812 seconds
        Maximum number of seconds to run all queries: 2.094 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
mixed:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 52.453 seconds
        Minimum number of seconds to run all queries: 52.453 seconds
        Maximum number of seconds to run all queries: 52.453 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 66.531 seconds
        Minimum number of seconds to run all queries: 66.531 seconds
        Maximum number of seconds to run all queries: 66.531 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
5.5
update:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 14.360 seconds
        Minimum number of seconds to run all queries: 14.360 seconds
        Maximum number of seconds to run all queries: 14.360 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 43.843 seconds
        Minimum number of seconds to run all queries: 43.843 seconds
        Maximum number of seconds to run all queries: 43.843 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
        
write:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 1.526 seconds
        Minimum number of seconds to run all queries: 0.703 seconds
        Maximum number of seconds to run all queries: 1.766 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 1.573 seconds
        Minimum number of seconds to run all queries: 0.766 seconds
        Maximum number of seconds to run all queries: 1.828 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
mixed:
Benchmark
        Running for engine myisam
        Average number of seconds to run all queries: 39.468 seconds
        Minimum number of seconds to run all queries: 39.468 seconds
        Maximum number of seconds to run all queries: 39.468 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 50.468 seconds
        Minimum number of seconds to run all queries: 50.468 seconds
        Maximum number of seconds to run all queries: 50.468 seconds
        Number of clients running queries: 50
        Average number of queries per client: 200
C:\Documents and Settings\Administrator>mysqlslap --defaults-file="D:/MySQL/MySq
l5.5/my.ini" --concurrency=100 --iterations=5 --number-int-cols=4 --auto-generat
e-sql --auto-generate-sql-load-type=update --engine=innodb --number-of-queries=1
000 -uroot
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 3.371 seconds
        Minimum number of seconds to run all queries: 2.547 seconds
        Maximum number of seconds to run all queries: 4.515 seconds
        Number of clients running queries: 100
        Average number of queries per client: 10
        
        
 C:\Documents and Settings\Administrator>mysqlslap --defaults-file="C:/Program
les/MySQL/mysql-5.1.54-win32/my.ini" --concurrency=100 --iterations=5 --number
nt-cols=4 --auto-generate-sql --auto-generate-sql-load-type=update --engine=in
db --number-of-queries=1000 -uroot
Benchmark
        Running for engine innodb
        Average number of seconds to run all queries: 3.831 seconds
        Minimum number of seconds to run all queries: 3.797 seconds
        Maximum number of seconds to run all queries: 3.860 seconds
        Number of clients running queries: 100
        Average number of queries per client: 10       

你可能感兴趣的:(mysql)