From the course: MySQL Advanced Topics (2019)

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Performance

Performance

- [Instructor] Transactions are commonly used to increase performance. A long list of inserts or updates are performed as part of a transactional unit they can perform much faster. In this example which I've copied from the chapter four exercise file, I'm using a lot of features that we have covered both in the essentials course and in this advanced title. So follow along as best you can but the whole point of all of this is that down here at the bottom and you'll have to forgive MySQLWorkbench. It does not scroll properly so I'm doing the best I can here. You'll see that we call this loop, which inserts 10,000 rows into a table. And first we call it without transactions. You notice the comment. So the start transaction and commit are commented out here. And then we're going to uncomment those and call this procedure again, which does the 10,000 and you'll see the performance difference. It's about 10 to one, which is…

Contents