MySQL Read/Write Benchmark I'm trying to benchmark Read/Write speed in MySQL 5.5. Currently I have a stored procedure that insert rows with random numbers to a table and I'm measuring time of execution before and after configuration changes.

Here's my procedure:

CREATE DEFINER=`root`@`localhost` PROCEDURE `InsertRand`(IN nor INT, in minr int, in maxr int)
begin
        declare i int;
        declare lastid int;
        set i =1;
        start transaction;
        while i &lt;= nor do
        insert into tbltest(Value) values (minr + CEIL(rand() * (maxr-minr)));
        set lastid = (select MAX(id) from tbltest);
        set i = i +1;
        end while;
        commit;
    end


Do you know any good way to benchmark this ? Maybe my procedure needs some improvement?
You should use MySQL's BENCHMARK() function

Here are my posts on how to use it


Apr 03, 2012 : How to use the &#39;select benchmark&#39; command on a procedure
Apr 16, 2013 : MySQL: CAST + SUBSTR vs. FLOOR + MOD


BTW if you do configuartion changes, you should restart mysqld immediately after the configuration changes are in place. Then, run your I/O tests.