Your database Performance Cost Security & compliance

Large MongoDB collection with only the _id index

Part of the Schema & indexes check · fix arrives as a guide

What it is

A large MongoDB collection has only the default _id index.

Why it matters

Every query not addressing a document by _id scans the whole collection, and at this size that means reading it into memory on each query. It shows up as memory pressure across the cluster, not just as one slow query.

How to fix it

Identify the query shapes from the profiler and add matching indexes. On a large collection, build them in the background to avoid blocking operations while the build runs.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.