Documents can move after they are inserted, for example if they outgrow their initial space allocation. Also when documents have moved, there are "holes" that other new docs may go into depending on their size.
-- Max
It seems that natural order is usually the same as insertion order, but not quite always.
What will cause natural order to not be insertion order?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
Documents can move after they are inserted, for example if they outgrow their initial space allocation. Also when documents have moved, there are "holes" that other new docs may go into depending on their size.
I am not the best expert in this area but...
We maintain free lists for re-use. Exponentially increasing bucket sizes. If new docs being inserted have a similar size distribution to the docs being deleted the space is reused pretty efficiently. To my knowledge other than re-use from the free lists there is no background compaction, though I have heard discussions about adding it.
I'll leave others to answer in more detail if that doesn't give you what you need.
-- Max
Documents can move after they are inserted, for example if they outgrow their initial space allocation. Also when documents have moved, there are "holes" that other new docs may go into depending on their size.
I have documents that represent aggregate stats for the day, and only the current day's record is modified. I recently noticed after about 18 months that one of them got inserted out of order. Is there any way to tell if it got inserted into a hole? Is there any way to prevent that, since under normal circumstances, older records will not be modified?(Yes, I know I can convert it to a capped collection - this is more curiosity than anything else.)
-- Max
On Jun 3, 2012 9:11 AM, "Adam Fields" <fie...@street86.com> wrote:
It seems that natural order is usually the same as insertion order, but not quite always.
What will cause natural order to not be insertion order?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to