SHARDING_FILTER stage and chunkSkips
Parent: Covered queries on sharded collections · Published reference · snapshot 2026-10-23 · skill mongodb-cohort-74cd39f19180
↓ Facts as markdownall context files
Source-anchored research for SHARDING_FILTER stage and chunkSkips. 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.
Structure and components
- In the MongoDB `master` `DistinctScan` implementation checked on 2026-10-21, shard-filtering an individual orphan document increments that stage's `chunkSkips`, while skipping orphan chunks increments the separate `orphanChunkSkips` statistic. Therefore, a `chunkSkips` field by itself does not prove that the plan contains a `SHARDING_FILTER` stage. (medium confidence) (verified as of 2026-10-21) [source]
Comparisons and alternatives
- MongoDB says explain fields used internally may be undocumented and that listed output fields can change, so treat the exact presence and shape of `chunkSkips` as diagnostic output rather than a stable application interface. (medium confidence) [source]
Facts and statements
- SHARDING_FILTER is MongoDB's execution stage for filtering orphan documents from a shard. For a sharded explain, execution statistics are reported per accessed shard, and chunkSkips appears among the stage statistics. (high confidence) [source]
- chunkSkips counts orphan documents filtered by SHARDING_FILTER on the current shard for that execution. Alibaba's example shows two input documents filtered and chunkSkips: 2; Huawei describes the field as the number of orphaned documents on the current shard. (high confidence) [source]
- Treat chunkSkips as a statistic for the specific explain execution, not as a persistent collection-wide inventory. Huawei's collection-wide check uses find().explain("executionStats") and warns that it scans every document across all shards, can take a long time, and can create query pressure. (medium confidence) [source]
- MongoDB defines `SHARDING_FILTER` as the execution stage that filters orphan documents from shards. In a plan that uses this stage, `chunkSkips` reports documents rejected by that filter. (high confidence) [source]
- For a collection-wide orphan check, Alibaba Cloud and Huawei Cloud instruct users to run an unfiltered `find().explain("executionStats")` and inspect each shard. Huawei says a nonzero `chunkSkips` identifies orphan documents on that shard; Alibaba's example shows the counter for documents filtered by `SHARDING_FILTER`. (high confidence) [source]
Children
- No children recorded.