<!-- llms-explorer concept facts · https://llms-explorer.com/tree/compass-aggregation-preview-sampling-versus-full-pipeline-execution/ · pack 2026-11-02 · ~846 tokens -->

# Compass aggregation preview sampling versus full pipeline execution

> Source-anchored research for Compass aggregation preview sampling versus full pipeline execution. Run status: COMPLETED.

Parent: [MongoDB Compass](https://llms-explorer.com/tree/mongodb-compass/) · 3 facets · 7 facts · page: https://llms-explorer.com/tree/compass-aggregation-preview-sampling-versus-full-pipeline-execution/

## 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](https://www.mongodb.com/docs/compass/agg-pipeline-builder/aggregation-pipeline-builder-settings.md)
- 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](https://refresher10.blogspot.com/2018/07/)
- 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](https://jira.mongodb.org/browse/COMPASS-9826)
- 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](https://www.mongodb.com/docs/manual/reference/operator/aggregation/limit.md)

## 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](https://jira.mongodb.org/browse/COMPASS-10104)
- 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](https://www.mongodb.com/community/forums/t/aggregation-group-by-count-sum-maxed-at-100k-count/189661) · [also](https://www.mongodb.com/docs/compass/agg-pipeline-builder/aggregation-pipeline-builder-settings.md)

## 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](https://www.mongodb.com/docs/manual/reference/operator/aggregation/group.md)
