Search code examples
mongodbwiredtiger

MongoDB WiredTiger use clustered index on _id field?


I know MongoDB WiredTiger use clustered index to store data. Is WiredTiger use clustered index on _id field or another key generate by WiredTiger?


Solution

  • WiredTiger uses a binary tree-like structure to store documents. It is a basic key-value store, where the key is an internally generated identifier, and the value is the document.

    All indexes, including the one on the _id field, map field values to the internal identifier.