Join Bill Weinman for an in-depth discussion in this video Using transactions for performance, part of MySQL Essential Training.
…Transactions are also commonly used to increase performance.…If a long list of inserts or updates are…performed as a transactional unit, they can perform much faster.…For this example, we're going to use the scratch database.…I'm going to start by creating a simple table.…CREATE TABLE and we'll call it test and we'll…give it an ID column and a data column.…So I'll go ahead and execute that and our table has been created.…
Now I'm going to insert some rows.…I'm going to insert 1,000 rows but they'll all be the same.…So it will be pretty easy to code this.…INSERT INTO test, the data column, values,…and 'this is a good sized line of text' and now I'm going to copy…and paste this a thousand times and we'll just select count to make sure.…I'll go ahead and execute this and you see…we have a 1,000 rows and it took 543.27 milliseconds.…
If I do this again a couple of times, you see the number…will decrease a little bit but now it's still in the 300 milliseconds range.…So this is a great little example.…If I put in a start transaction here at the…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.