I wrote a stored procedure on MySQL that is using a cursor to update a table of about 45,000 rows. The details what it is doing is are unimportant but the logic is very simple. The procedure was running extremely slowly (of the order of 1/10 th second per operation) – the steps below describe […]