I have a stored procedure which inserts around 3K rows in a temporary table. This SP used to take 3 seconds on Mysql 5.1 (windows desktop), the same SP was taking around 2 mins on Mysql 5.5.
I tried lot of things like optimizing innodb by changing innodb_buffer_pool_size etc but nothing worked and then I read something on stackoverflow which solved my problem.
START TRANSACTION;
CALL sp();
COMMIT;
The above code solved the issue and now I am back to 3 secs execution time. Can someone please tell me what exactly is happening here. Why do I have to add start transaction in 5.5 for fast execution? Why didnt I need this in 5.1
I added the following line in my mysql.ini file
It seems to have solved the issue, the procedure runs fast now. Ideally innodb_flush_log_at_trx_commit should be 1 for ACID compliance.