The MongoDB data file structure--record is a doubly linked list of embedded Bson, consisting of multiple record or index extent

Source: Internet
Author: User
Data file structure

Extent

Within each data file, MongoDB organizes the data of the stored Bson document and the B-tree index into the logical container "Extent". As shown (My-db.1 and my-db.2 are the two data files of the database):

  • A file can have multiple extent
  • Each extent will only contain a collection of data or indexes
  • The data or index of the same collection can be distributed within multiple extent. These extent can also be divided into several files
  • The same extent doesn't have the data and the index.

Record Records

There are multiple "records" in each extent, each containing a record header and MongoDB Bson document, plus some extra padding space. Padding is that MongoDB allocates some extra unused space when inserting records, so that future documents become larger without the need to migrate documents elsewhere. The record header starts at the size of the entire record, including the record's own location and the location of the previous record and the last record. Can be imagined as a double Linked List.

Transferred from: Http://www.mongoing.com/blog/file-storage

The MongoDB data file structure--record is a doubly linked list of embedded Bson, consisting of multiple record or index extent

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.