Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Trivially, a UUID is wider (128 bits as opposed to 64). You can choose to generate your UUIDs using a Instragram[0]-like strategy so you can, for example, benefit from temporal/spatial locality in the indexes. There may be performance consequences of using the wider datatype, but I suspect this could be overwhelmed by other application concerns if you're dealing with data that benefits from the wider type.

[0] https://engineering.instagram.com/sharding-ids-at-instagram-...

Edit: Update to correct snowflake to Instagram's strategy. I make this mistake often enough that it's now self-reinforcing :/



So you are presumably agreeing that snowflake makes sense?


Oh, of course! Depending on your application needs, it certainly can work. The benefit of PostgreSQL UUID is that you effectively have twice the bits, so you have more room to encode data and satisfy your uniqueness guarantees.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: