4min chapter

Postgres FM cover image

UUID

Postgres FM

CHAPTER

How to Hide a Random Number in a Social Network

We wanted some random numbers but like not real random numbers. So if you take two mutually prime numbers and just multiply sequence value by one of them, you will have like looking like kind of random numbers but it will not be really random numbers. We used this approach for all our surrogate primary keys. And that's it. It was a single primary. But in the second social network, I co-founded a few years ago, later. We used the same approach and then we ended up having a real nasty problem for the first time. When your table is growing very fast, 2.1 billion records if you use integer 4 primary key. You cannot insert, POSGIS cannot insert

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode