Update a Table with Millions of Rows in SQL (Fast)

Channel Avatar
Update a Table with Millions of Rows in SQL (Fast)
Update a Table with Millions of Rows in SQL (Fast)
Running an SQL UPDATE statement on a table with millions of rows can often take a long time.

There are several different ways you can update this data so that it runs faster.

In this video, I explain and demonstrate five different approaches to updating data in a table with millions of records.

The demonstration is done in Postgres, but the concepts are valid for Oracle, SQL Server, MySQL, and other vendors.

00:00 – Our sample data
00:47 – Method 1
01:22 – Method 2
02:09 – Method 3
04:38 – Method 4
05:25 – Method 5

Scripts used in this video: https://github.com/bbrumm/databasestar/tree/main/videos/090_update

Get my free SQL Cheat Sheets: https://www.databasestar.com/get-sql-cheat-sheets/
SQL Roadmap from basics to advanced: https://www.databasestar.com/sql-roadmap/
️ Learn how to design a database: https://databasestar.mykajabi.com/edd
Improve your SQL and database skills with Database Star Academy: https://www.databasestar.com/dsa/
Contact me here: https://www.databasestar.com/contact/

Database Design Exercises: https://bbrumm.gumroad.com/l/hqsxi
SQL Practice Questions: https://bbrumm.gumroad.com/l/ulekqk
SQL Performance Quick Guide: https://bbrumm.gumroad.com/l/fcvny
Ultimate SQL How-To Guide: https://bbrumm.gumroad.com/l/oqggau

Take the opportunity to connect and share this video with your friends and family if you find it useful.

Keywords: how to update a large sql table in chunks, how to update a large sql table in batches, sql update, sql update millions

Read Also

Leave a Reply

Your email address will not be published. Required fields are marked *