> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Aggregation Pipeline Builder Settings

MongoDB Compass Readonly Edition will be deprecated in a future release. To replicate the read-only behavior in a standard Compass edition, assign users [`read`](https://www.mongodb.com/docs/manual/reference/built-in-roles.md#mongodb-authrole-read) access at the database level and enable the [readOnly](https://www.mongodb.com/docs/compass/settings/read-only.md#std-label-compass-read-only) option in Compass.

You can adjust your MongoDB Compass Aggregation Pipeline Builder settings to customize your aggregation experience and improve pipeline performance.

## Settings

To view and change your aggregation pipeline settings, click the gear icon at the upper right of the pipeline builder to open the Settings panel.

| Option | Description | Default Value |
| --- | --- | --- |
| Comment Mode | When enabled, adds helper comments to each stage. | Enabled |
| Number of Preview Documents | Sets number of documents to show in the preview. | 10 |
| Limit | Specifies the number of documents passed to [`$group`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/group.md#mongodb-pipeline-pipe.-group), [`$bucket`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucket.md#mongodb-pipeline-pipe.-bucket), and [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto.md#mongodb-pipeline-pipe.-bucketAuto) pipeline stages. Lower limits improve pipeline run time but might result in missing documents. This setting is only applied to document previews. It is not applied when the pipeline is run. | 100000 |

## Learn More

- [Create an Aggregation Pipeline](https://www.mongodb.com/docs/compass/create-agg-pipeline.md#std-label-compass-create-agg-pipeline)

- [Specify Custom Collation For Your Pipeline](https://www.mongodb.com/docs/compass/agg-pipeline-builder/pipeline-custom-collation.md#std-label-compass-pipeline-custom-collation)

- [Set Max Time MS for Aggregation Queries](https://www.mongodb.com/docs/compass/agg-pipeline-builder/maxtime-ms-pipeline.md#std-label-compass-set-maxtime-ms-agg)
