I am considering using UUIDs v1 for my document indexes instead of ObjectId. I am concerned about the performance and unsure of the best way to proceed with switching to uuids.
My performance concern stems from comments about ObjectID being more efficient with b-tree/indexing. What kind of performance issues am I looking at?
My other concern is the unique factor. I am creating an API to store publicly accessible documents and will eventually have to consider sharding. And there is this document from Mongo about issues with ObjectIDs uniqueness and sharding.
I am not fully clear on what issues might arise from this ability to check uniqueness across shards and if it would create problems for my situation. (basically people can create documents from the website or API and search them the same way. I would say lets think in the low millions of documents for the sake of this question. I am more concerned about fetches then lots of parallels inserts).
It seems there are pros and cons to both types of IDs. Can someone clarify this?