There are no significant differences in performance, as far as I know, except in some cases, such as ordering by date (since ObjectId has a date-time in them, etc.)
For example, you lose the ability to simply order with _id , you also lose the benefits of sharding and distribution . Also, although I still personally used ObjectId anyway ... as long as int is not sure (of course) ... you should be fine.
Since _id is always "returned" in the request, I suppose you would save a little time and data transfer (bit bit).
You can even make your _id array if you want, and all of this will be fine to see this answer (not that I'd definitely recommend this most of the time.)
Also see: Optimizing Object Identifiers
source share