Unexpected downsides of UUID keys in PostgreSQL
UUID is also used to avoid leaking information about the underlying system. This includes temporal information that could be used to infer the size of the dataset for all users.If this isn’t a concern, then using a timestamp based approach as recommended in this article is a good approach. That is the default in MongoDB.If it is a concern, one approach is to use random UUIDs to give to end users but then internally to have something like auto increment ids.