Is MongoDB _id (ObjectId) generated in an ascending order?
问题 I know how the _id column contains a representation of timestamp when the document has been inserted into the collection. here is an online utility to convert it to timestamp: http://steveridout.github.io/mongo-object-time/ What I'm wondering is if the object id string itself is guaranteed maintain the ascending order or not? i.e. does this comparison always return true? "newest object id" > "second newest object id" 回答1: No, there is no guarantee whatsoever. From the official documentation: