Back to Browse

How To Load One BILLION Rows into an SQL Database

39.6K views
Jul 9, 2024
12:17

📝 Get my free SQL Cheat Sheets: https://databasestar.mykajabi.com/lpkj-sql-cheat-sheets/?video=Mr5o4_wMrwA 🎓 Master SQL Fundamentals: https://databasestar.mykajabi.com/sql-simplified/?video=Mr5o4_wMrwA Have you ever wondered how to import one billion rows into an SQL database? Or how long it would take? In this video, you'll see how to generate a file with 1 billion rows, how to import it into four different SQL databases, and how long it takes in each database. ⏱ TIMESTAMPS: 00:00 - The challenge 00:31 - Setting up the data 02:08 - MySQL 04:08 - Postgres 05:31 - SQL Server 07:35 - Oracle method 1 09:33 - Oracle method 2 🔗 VIDEO LINKS: Gunnar Morling's blog post: https://www.morling.dev/blog/one-billion-row-challenge/ 1BRC GitHub repo: https://github.com/gunnarmorling/1brc SQL scripts used in this video: https://github.com/bbrumm/databasestar/tree/main/videos/161_billion Commands to clone the repo and generate the file: git clone https://github.com/gunnarmorling/1brc.git java -version mvnw verify sh create_measurements.sh 1000000000 Specs of the computer used in this video: Lenovo Ideapad 5 laptop CPU: Intel i5 2.4 GHz RAM: 16 GB OS: Windows 11

Download

1 formats

Video Formats

360pmp418.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How To Load One BILLION Rows into an SQL Database | NatokHD