Menggunakan mysqlslap untuk membandingkan Engine

From OnnoWiki
Revision as of 15:43, 22 November 2021 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Kita dapat membandingkan engine dengan argumen --engine.

Sebagai contoh, jika kita ingin menggunakan engine innodb

mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100
--number-of-queries=1000 --engine=innodb 

Output mysqlslap kira-kira sebagai berikut,

Benchmark
	Running for engine innodb
	Average number of seconds to run all queries: 0.435 seconds
	Minimum number of seconds to run all queries: 0.435 seconds
	Maximum number of seconds to run all queries: 0.435 seconds
	Number of clients running queries: 100
	Average number of queries per client: 10

Menggunakan engine myisam

mysqlslap -h localhost -u root  -p123456 --auto-generate-sql --concurrency=100
--number-of-queries=1000 --engine=myisam

Output mysqlslap kira-kira sebagai berikut,

Benchmark
	Running for engine myisam
	Average number of seconds to run all queries: 0.198 seconds
	Minimum number of seconds to run all queries: 0.198 seconds
	Maximum number of seconds to run all queries: 0.198 seconds
	Number of clients running queries: 100
	Average number of queries per client: 10