5 million + random rows in less than 100 seconds using SQL

preview_player
Показать описание

Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.

In the video, I demonstrated how to efficiently generate 5 million rows of random data for a taxonomy structure in SQL. We focused on creating categories, subcategories, and topics using just SQL commands and leveraging joins for data amplification. By utilizing a helper table named counters and strategically using insert statements with select queries, we efficiently populated the database with the required data. The process involved careful structuring and utilization of joins for data multiplication, resulting in the successful generation of 5 million rows in under 100 seconds.

# Recommended videos and playlists

If you liked this video, you will find the following videos and playlists helpful

# Things you will find amusing

# Other socials

I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.

Thank you for watching and supporting! it means a ton.

I am on a mission to bring out the best engineering stories from around the world and make you all fall in
love with engineering. If you resonate with this then follow along, I always keep it no-fluff.
Рекомендации по теме
Комментарии
Автор

This is something new for me I just learned sql for interviews 😅 but practically I mostly used nosql database one request if possible create one application build which uses SQL as database that Will fun and interesting as your teaching is super clear sir🔥🔥

abhishekvishwakarma
Автор

Thanks you so much. nice and simple solution

lehung-upjv
Автор

Can anyone explain Why at the end of the video, the number of rows inserted are 5, 000, 000 and not 5, 005, 050 ?

koushikr
Автор

Arpit, your videos are awesome. I have been seeing your videos from the last one week, I liked all your content. Curious how did you develop so much knowledge on every topic (db, hld, micro services )?

hc
Автор

Just wondering, what made MySQL pick the ordering of digits at 24:43? I.e. 090, 190, 290 etc instead of just 000, 001, 002 ... 999?

RohanChouguleTechEd
Автор

how did you come up with this topic? Are you generating data for your staging 😀 piez?

loutube
Автор

@ Arpit Bhayani is this mysql workbench?

marcusaureliusfanboy
Автор

I think you called me today about 20 times from 20 different numbers. Jk, I appreciate your video. I’m needing to find faster query’s in a table of only 400k records. Problem is I have 30 union alls to aggregate data for 30 locations. The YTD for each month kills performance. Kills it….

Platoface
Автор

hindi mai kardo na video next time se pls if possible!!

adilkhatri