Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Guest
Created on May 4, 2021

Provide an alternative sampling technique for views in MongoBI Connector

As stated in the docs (https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#behavior), the `$sample` stage will perform a full `COLLSCAN` if some criteria won't be met. The problem is that no view (https://docs.mongodb.com/manual/core/views/) will ever meet these, as the `$sample` won't be the first aggregation stage. My proposal is to implement additional, `$skip`+`$limit` based sampling.