In REST applications, I need to convert UUID
string representation (received in json
) to UUID Object
to store it on MongoDB's _id
field. I'm doing that as I heard there is a performance gain in the lookup/insertion time when using UUID
vs String
.
Is there really a performance gain when using UUID
as _id
on MongoDB instead of its string representation? (even small performance gains can have a big impact for me)
PS: I saw this post that says performance is better for ObjectID
(not exactly the same, not sure it applies to UUID
), but the only reason seems to be the potential smaller size of ObjectID
vs String
.