Discussion:
[mongodb-dev] Structure of the _id and document storage in mongodb
Moditha Hewasinghage
2018-05-03 13:54:26 UTC
Permalink
Hi,

Can anyone direct me to the correct path where I can find the exact
structure of how the index for _id is maintained, blocks allocated and the
data stored? I was trying to insert simple documents ({a:1,b:2}) with
default _id creation. When I check the stats of the data it says document
size is 44b and the storage size is16384 (using wired tiger without
compression to get better idea). It says 3 blocks are allocated (block size
4KB) so I'm not sure what the other block is being used for (16384/4096=4).
Moreover, when inserting the same sized documents at the 4th document (data
is 176b), the storage expands to 7 blocks. If someone could help me with
how exactly the data is stored it would be really helpful or where to find
it in the source code.

Thank you,
Moditha
--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/27bded9c-7562-4e9a-a50c-db9a1d990e8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...