Compass aggregation preview sampling versus full pipeline execution
Parent: MongoDB Compass · Published reference · snapshot 2026-11-02
↓ Facts as markdownall context files
Source-anchored research for Compass aggregation preview sampling versus full pipeline execution. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Problems, failure modes and limitations
- The Compass settings snapshot distinguishes Number of Preview Documents (output documents shown; default 10) from Limit (documents passed to $group, $bucket, and $bucketAuto; default 100,000). The latter is preview-only and is not applied when the pipeline is run. These are separate controls, so raising the displayed-document count does not raise the documented grouping-input cap. (low confidence) (verified as of 2026-10-14) [source]
- A firsthand July 8, 2018 walkthrough explicitly using Compass 1.14.5 places its 100,000-document Sample Mode limit before $group, $bucket and $bucketAuto. This independently corroborates historical input-limit placement, without establishing the current interface or default. (low confidence) [source]
- COMPASS-9826 describes recurrent differences between Compass aggregation-builder previews and actual pipeline results. The issue identifies the limit on the number of documents consumed by blocking stages such as $group as the most common cause. (low confidence) [source]
- The $limit manual defines the stage as limiting the number of documents passed to the next pipeline stage. Its aggregation example with { $limit : 5 } returns the first 5 documents passed to the stage without changing their contents. (low confidence) [source]
Comparisons and alternatives
- COMPASS-10104 identifies Compass 1.48.2 and reports different grouped counts between stage previews and VS Code execution. The reporter acknowledges the preview-only 100,000 input limit and requests clearer stage warnings. This is a user report, not proof of incorrect server aggregation. (low confidence) [source]
- A September 2022 community-thread reproduction counted 200,000 documents correctly with MongoDB 6.0.1 and a $group/$sum pipeline; the later response explained Compass's configurable 100,000-document Sample Mode limit. This historical example scopes the apparent ceiling to the builder context rather than establishing a universal 100,000-document server aggregation limit. (medium confidence) [source 1] [source 2]
Facts and statements
- The $group manual states that an _id value of null, or another constant value, returns one document that aggregates values across all input documents. Its Group by null example calculates a count of all documents with count: { $sum: 1 }. (low confidence) [source]