<!-- llms-explorer concept facts · https://llms-explorer.com/tree/serverstatus-metrics-query-cbr/ · pack 2026-10-22 · ~853 tokens -->

# serverStatus metrics.query.cbr

> Source-anchored research for serverStatus metrics.query.cbr. Run status: COMPLETED.

Parent: [MongoDB Advanced Explain: Aggregation, Sharded Plans, Loose Index Scans and the 8.3 Cost-Based Ranker](https://llms-explorer.com/tree/mongodb-advanced-explain-aggregation-sharded-plans-loose-index-scans-and-the-8-3-cost-based-ranker/) · 3 facets · 7 facts · page: https://llms-explorer.com/tree/serverstatus-metrics-query-cbr/

## How it works

- MongoDB's version-pinned 8.3 `serverStatus` reference documents `metrics.query.cbr` as the query-plan cost-based-ranker metrics object and marks its fields as new in 8.3.3. Percona independently describes the counters as a way to see when CBR ran and how often it won. (high confidence) (verified as of 2026-10-22) — [source](https://www.mongodb.com/docs/v8.3/reference/command/serverstatus/)
- `metrics.query.cbr.count` counts server uses of the cost-based ranker, while `metrics.query.cbr.choseWinningPlan` counts times the ranker chose a winning plan. Read them as separate invocation and win counters; Percona describes the same distinction as seeing when CBR was used and how often it won. (high confidence) (verified as of 2026-10-22) — [source](https://www.mongodb.com/docs/v8.3/reference/command/serverstatus/)
- Because serverStatus statistics reset when mongod restarts, monitor CBR invocation rates using count deltas over a fixed interval. MinervaDB illustrates subtracting two serverStatus snapshots and dividing the metrics.query.cbr.count delta by 60 seconds. (medium confidence) (verified as of 2026-10-22) — [source](https://www.mongodb.com/docs/v8.3/reference/command/serverstatus/)
- MinervaDB's example labels `metrics.query.cbr.count` as available since MongoDB 8.3, while MongoDB's 8.3 reference gives the patch-specific introduction as 8.3.3. Use 8.3.3 as the minimum documented version when checking field availability. (medium confidence) (verified as of 2026-10-22) — [source](https://minervadb.com/mongodb-performance-troubleshooting/)

## Comparisons and alternatives

- MongoDB Jira reports that `numPlansTiedCostEstimation` once incremented both for tied plans and for plans rejected as more expensive, and lists the fix version as 8.3.3. The 8.3 reference marks the metric new in 8.3.3 and defines it as counting tied plans, so the sources place the correction at its documented introduction rather than showing an ongoing post-8.3.3 defect. (medium confidence) (verified as of 2026-09-20) — [source](https://jira.mongodb.org/browse/SERVER-125719)

## Facts and statements

- The reference defines `metrics.query.cbr.micros` as total CBR time including sampling and ranking, and `samplingMicros` as sampling time. `numPlans` counts candidate plans; the `histograms` subfields expose distributions for total time, sampling time, and candidate-plan count. MinervaDB's monitoring guide independently identifies CBR invocation counts, ranking time, and candidate-plan counts as useful monitoring data. (medium confidence) (verified as of 2026-10-22) — [source](https://www.mongodb.com/docs/v8.3/reference/command/serverstatus/)
- metrics.query.cbr.numPlans counts candidate plans compared; numPlansFailedCostEstimation and numPlansTiedCostEstimation count candidate plans whose costs could not be estimated or tied. (low confidence) — [source](https://www.mongodb.com/docs/v8.3/reference/command/serverstatus/)
