A schema suggestion is an Atlas recommendation for changing field structure, indexes, or data types after analyzing collection traffic, slow queries, and sampled documents. It turns observed bottlenecks into targeted data-modeling improvements. section 21.2.2
Schema suggestions commonly address:
- Restructuring deeply nested fields or excessive arrays to reduce query complexity. section 21.2.2
- Normalizing fields whose data types or sizes vary widely, improving query performance and storage efficiency. section 21.2.2
- Adding indexes for frequently filtered fields or adjusting field arrangements to improve query execution plans. section 21.2.2
- Adapting recommendations as workloads, traffic patterns, and data structures evolve. section 21.2.2
Applying a suggestion
When a high-traffic collection contains slow queries filtering on a field without a suitable index, Atlas can recommend adding an index for that field. Review the recommendation in the Atlas UI, then implement it when it fits the application’s access pattern. section 21.2.2
Schema suggestions work alongside Query Profiler, Namespace Insights, and other monitoring tools: diagnostics reveal latency and bottlenecks, while recommendations propose changes to the underlying data model. section 21.5
