Michele Riva
8.5K posts

Michele Riva
@MicheleRivaCode
Independent Researcher - Distributed systems for a living, philosophy & neuroscience for a life worth living.
San Francisco, California Katılım Mayıs 2011
943 Takip Edilen4.8K Takipçiler

A star would be highly appreciated - lost 10.5k of them
github.com/micheleriva/zb…
English

@nicolasrouanne Got kicked out the github org after I left my own company, now project is unmaintained/sloppy
github.com/oramasearch/or…
English

@brandonkpbailey the tweet I quoted uses "users" as domain example, but it could be anything
English

@MicheleRivaCode I meant to say production users. Not really sure how i goofed that up
English

Real interview question is how to move away from design A before you run out of integers. Serial4 exhausts at ~2.1B, moving a pk to uuid means regenerating an index and if you don't know how to index stuff correctly you’ll blow the db. Also you cannot backfill with a migration - you’ll blow the db again. Even when you backfill, how do you ensure non-nullish values without running an unique query?
Mid-level eng question imho
Tanuj@tanujDE3180
Backend Interview Question: Which endpoint scales better ? Autoincrement vs UUID
English

@rackSpreader1 yes if you're a techbro
no if you're a normal guy
English

@MicheleRivaCode Are the 2.1B productions in the room with us?
English

@c4_cauliflower Yes. Index using `CREATE INDEX CONCURRENTLY` to avoid surprises. Next question is, how do you enforce foreign keys are not screwed up?
English

@MicheleRivaCode Before switching off of the integer pk, add a new optional column for the UUIDs, fill it for all new entries and use a script to backfill the old entries at whatever rate you can get away with. Once the old entries are all backfilled, switch to using the new column.
English



@MicheleRivaCode if you have 2 billion users you can afford to hire someone to figure it out...
English

@MicheleRivaCode Real ones know to switch over to negative ints
English

@theharshpat First of all check the postgres version 'cause it's not supported <18
Then why v7 over v4? If time is the reason, wouldn't a timestamp column work just fine?
English

@MicheleRivaCode How do you move away from uuidv4 mess to uuidv7? 1TB database btw. Painful af
English











