Post

bigint for primary keys, slugs or NanoIDs when exposing IDs publicly 🔥 From my testing bigint performs better than UUIDs especially when joining multiple tables Also not a fan of UUIDs as public IDs or in logs, prefer NanoIDs, mainly cos of length, easy to select & IMO looks nicer #buildinpublic

Anant Parmar@anantparmar.com

ULID, UUID, bigInt, int What's your go to primary key type? #buildinpublic

1 repost5 likes

I had no clue they renamed hashid to sqids! Yes, love hashids for when you want to obscure one or more int ids, but I’ve started preferring nanoids for when you want to store that id in the DB at insertion time