Where is my data stored?

MongoDB stores data and indexes on disk in a compressed binary format. Individual documents are represented in BSON, a binary JSON-like serialisation format that supports additional data types such as dates, 32-bit integers, 64-bit integers, 128-bit decimals, ObjectIDs, and binary data.

Data is written to disk using block compression for documents and prefix compression for indexes. Compression defaults are configurable at a global level and can also be set on a per-collection and per-index basis during collection and index creation.

For further reading that might provide helpful background info, see:

Regards,
Stennie

1 Like