Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to conduct stress test on our MySQL DB. I have the list of queries i need to execute. I have tried using Apache JMeter for this but it is very time consuming. Is it possible to run mysqlslap with custom .sql file containing INSERT, UPDATE, SELECT queries on specified MySQL database?

share|improve this question
    
see the --query option –  Cristian Porta Apr 17 '13 at 12:35
    
--query option allows only SELECT statements as mentioned here:dev.mysql.com/doc/refman/5.1/en/… –  Ruchit Rami Apr 18 '13 at 4:01
2  
Try changing your stress test tool, if you can, take a look on my answer here: dba.stackexchange.com/questions/39221/… –  Cristian Porta Apr 18 '13 at 5:01
add comment

1 Answer

up vote 1 down vote accepted

The mysqlslap --query option will absolutely take a file containing lines with INSERT, UPDATE, DELETE, and REPLACE INTO statements, as well as SELECT.

In fact, one of the examples later in the documentation shows it taking an INSERT:

http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html#option_mysqlslap_number-of-queries

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.