nerdexam
MongoDB

C100DBA · Question #57

Aggregation Pipelines have a limit of:

The correct answer is B. 16 MB document and 100 MB RAM. MongoDB Aggregation Pipelines enforce two hard limits: 16 MB for individual documents (the BSON maximum document size) and 100 MB of RAM per pipeline stage before it must spill to disk (unless allowDiskUse: true is set). Option A is wrong because 2 MB is not a real MongoDB limit

MongoDB Fundamentals

Question

Aggregation Pipelines have a limit of:

Options

  • A2 MB document and 100 MB RAM
  • B16 MB document and 100 MB RAM
  • CNo limit on document and 100 MB RAM
  • D2 MB document and no limit on RAM

How the community answered

(50 responses)
  • A
    2% (1)
  • B
    90% (45)
  • C
    2% (1)
  • D
    6% (3)

Explanation

MongoDB Aggregation Pipelines enforce two hard limits: 16 MB for individual documents (the BSON maximum document size) and 100 MB of RAM per pipeline stage before it must spill to disk (unless allowDiskUse: true is set). Option A is wrong because 2 MB is not a real MongoDB limit - it's a plausible-sounding distractor. Option C is wrong because there absolutely is a document size ceiling (16 MB); no MongoDB document can exceed BSON's hard cap. Option D is wrong because the RAM constraint is real and enforced - stages that exceed 100 MB will error unless disk use is explicitly allowed.

Memory tip: Think "16/100" - the same 16 MB BSON document limit that applies everywhere in MongoDB also caps aggregation output, paired with the 100 MB RAM-per-stage rule. If you remember that 16 MB is MongoDB's universal document ceiling, option B follows naturally.

Topics

#aggregation pipeline#document size limit#RAM limit#pipeline constraints

Community Discussion

No community discussion yet for this question.

Full C100DBA Practice