<!-- llms-explorer concept facts · https://llms-explorer.com/tree/atlas-query-insights-query-shape-insights-and-namespace-insights/ · pack 2026-10-31 · ~1641 tokens -->

# Atlas Query Insights: Query Shape Insights and Namespace Insights

> Source-anchored research for Atlas Query Insights: Query Shape Insights and Namespace Insights. Run status: COMPLETED.

Parent: [Database Profiler vs Query Profiler](https://llms-explorer.com/tree/database-profiler-vs-query-profiler/) · 4 facets · 19 facts · page: https://llms-explorer.com/tree/atlas-query-insights-query-shape-insights-and-namespace-insights/

## How it works

- Atlas queryShapeHash identifies the newer query shape used for query statistics; it is distinct from planCacheShapeHash, formerly queryHash. Do not equate these identifiers when correlating observability data with plan-cache diagnostics. (medium confidence) — [source](https://www.mongodb.com/docs/manual/core/query-shapes.md)

## Measurements and reference values

- On MongoDB 8.x, Atlas collects at most 100 reads per second per host and excludes writes; on 9.0+, its default is random sampling of 1% of reads and writes. Values describe collected operations, so upgrades can change totals without workload changes. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Datadog query-shape metrics expose samplingstrategy and samplingrate. The rate_limited strategy reports samplingrate=0; sampled collection uses a fraction such as 0.01 for 1%. Zero therefore must not be interpreted as a random sample fraction. (low confidence) (verified as of 2026-10-14) — [source](https://docs.datadoghq.com/integrations/mongodb-atlas)

## Problems, failure modes and limitations

- A local-shard $lookup can increment foreign-collection namespace latency and operation counts without generating a foreign-collection slow-query log. SERVER-98528 documents this observability mismatch and attaches a reproducer. (medium confidence) (verified as of 2026-10-23) — [source](https://www.mongodb.com/docs/atlas/namespace-insights.md)
- Datadog exports query-shape metrics under mongodb.atlas.querystats, including execution counts, document examination and working time. MongoDB documents queryshapehash as the correlation tag for Atlas UI, slow logs and API lookups. (medium confidence) — [source](https://docs.datadoghq.com/integrations/mongodb-atlas)

## Facts and statements

- Query Shape Insights groups structurally similar operations and ranks shapes by total execution time; Namespace Insights compares collection-level latency. Together they locate expensive workload patterns and affected collections. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Query Shape Insights requires dedicated M10+ clusters running MongoDB 8.0+. The documented window is seven days, with up to five shapes charted together. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Namespace-level metrics support comparing affected collections. Mydbops independently describes namespace-level Query Insights visibility; its 2024 preview is historical evidence, not confirmation of the current interface. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/namespace-insights.md)
- Namespace Insights excludes time-series collections and hides collections using Queryable Encryption. Automatically selected top namespaces can change with the time window; missing samples may be interpolated and drawn with dotted lines. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/namespace-insights.md)
- Namespace Insights total latency and operation count are rates. Average latency uses differences in cumulative duration and operation count over a ten-minute interval. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/namespace-insights.md)
- The Query Shape Insights summaries API deprecates P50/P90/P99 execution-time series and fields as potentially inaccurate. SERVER-126327 attributes incorrect percentiles to calculation from lastExecMicros and requests native execution-time histograms; avoid treating those legacy values as reliable distributions. (medium confidence) (verified as of 2026-10-23) — [source](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/2025-03-12/operation/operation-listgroupclusterqueryshapeinsightsummaries)
- The query shape and namespace dashboards provide host/node, shard and interval filters and expose aggregate query shape or collection statistics. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Query Shape Insights requires dedicated Atlas M10+ clusters running MongoDB 8.0 or later. Namespace Insights also requires M10+. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Query Shape Insights exposes execution counts, examined/returned document ratios and execution-time trends, with application and driver metadata for workload attribution. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Query Shape Insights helps identify expensive query shapes and provides a pivot to Query Profiler with collection and operation-type filters. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Displayed query-shape totals represent collected operations. A sampling-policy change during an 8.x-to-9.0 upgrade can change totals without a workload change; infrequent shapes can be absent. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- Namespace Insights offers total and average latency, P50/P95/P99 latency, operation counts, and read/write/command filters. Its documented average uses differences in cumulative times and counts over a ten-minute interval. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/atlas/namespace-insights.md)
- Query Shape Insights execution time includes getMore processing and excludes client waiting time. Datadog working_millis_sum_total uses milliseconds, while Atlas UI execution-time descriptions use microseconds; normalize units before comparison. (medium confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
- The documented query shape and namespace dashboards list aggregate workload statistics; their metric inventories do not list an explicit replanReason field. (low confidence) — [source](https://www.mongodb.com/docs/atlas/query-shape-insights.md)
