The effect of Random UUID on database performance @hnasr
The effect of Random UUID on database performance  @hnasr
Uploaded August 2023 | Updated November 2026, 3 hours ago
In this video I whiteboard how UUIDs hurt write (and read performance) when used on secondary and primary indexes. UUIDv4 are the most popular but they are truly random. Compared to snowflakes, ULID or UUIDv7 or even UUIDv1.

0:00 UUIDv4
2:30 B+Tree Indexes and UUID
5:30 Random UUIDv4 Insert Workload
12:40 Ordered Insert Workload (UUID7/ULID, Sequence)
14:00 Shared buffer pool flushes
15:00 Shopify ULID use case
17:00 URL shortner UUIDs?


Discovering Backend Bottlenecks: Unlocking Peak Performance
performance.husseinnasser.com


Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
backend.husseinnasser.com

Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.husseinnasser.com

Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husseinnasser.com

Follow me on Medium
medium.com/@hnasr/membership


Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinnasser.com

Python on the Backend (link redirects to udemy with coupon)
python.husseinnasser.com

Become a Member on YouTube
youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join

Buy me a coffee if you liked this
buymeacoffee.com/hnasr

Arabic Software Engineering Channel
youtube.com/channel/UChWZsjdoRvZ0T9QWZOD6UpA

🔥 Members Only Content
youtube.com/playlist?list=UUMO_ML5xP23TOWKUcc-oAE_Eg



🏭 Backend Engineering Videos in Order
backend.husseinnasser.com

💾 Database Engineering Videos
youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2

🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast

Gears and tools used on the Channel (affiliates)

🖼️ Slides and Thumbnail Design
Canva
partner.canva.com/c/2766475/647168/10068


Stay Awesome,
Hussein
The effect of Random UUID on database performanceyOuR DNS qUeRies wILl eVenTualLy lOok lIKe ThIs (0x20 DNS encoding)MongoDB Internal ArchitectureClustered Collections makes Mongo faster but there is a costSix stages of a good software engineerCloudflares 150ms global cache purge | Deep DiveWhy Cloudflare Ditched NGINXPrimary Key vs Secondary Key - What you probably didnt knowPostgreSQL Internal Architecture ExplainedNode and the Thread PoolThey made Kafka 80% faster by switching file systemsGraceful shutdown is needed to scale backends
Hussein Nasser |

The effect of Random UUID on database performance

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER