Skip to main content

COLLSCAN

Short Description

Collection scan

Detailed Description​

COLLSCAN stands for "collection scan" in MongoDB.

When you see COLLSCAN in an explain plan, it means that MongoDB is looking at every single document in the collection to find results for your query. This happens when no suitable index exists for the fields you're searching on or sorting by.

Key points:

  • It checks every document, one by one.
  • It can be slow, especially for large collections.
  • You can often avoid COLLSCAN by creating indexes on the fields you query most.

So, COLLSCAN means MongoDB isn’t using any shortcuts (indexes) and is scanning the whole collection directly.

Search online​

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.