We are storing lots of data in our Mongo DB collection. We do not customize the _id field value. I have an index on a timeStamp
field in this collection. This field itself records the insertion time of the record only. Given that the ObjectID
in the _id
field contains a timestamp can I use MongoDB _id
field default index for the same queries?
Would using the _id
field be as effective as the separate timestamp index?
I am trying to improve my insertion performance as this collection takes heavy write load.
In addition to the insertion load, we run an aggregation on this collection every 5 minutes based on time range.