MongoDB CollScan tracking in QAN

Description

Problem:

  • For mongoDB Query analysis, it’s very important to track queries where a full scan of the dataset is happening.

    COLLSCAN is generally not a good approach for MongoDB because it involves scanning every document in a collection to find matching results. This can be extremely inefficient, especially for large collections or complex queries.

    Here are some reasons why COLLSCAN is inefficient:

    • High I/O Overhead: Reading every document from disk can significantly increase I/O operations, which can be a bottleneck for performance.

    • Long Execution Time: Scanning large collections can take a considerable amount of time, especially if the query is complex or involves many documents.

    • Scalability Issues: As the size of the collection grows, COLLSCAN becomes even more inefficient, making it difficult to scale the database effectively.


In PMM, We dont have option to filter queries that do COLLSCAN (full collection scan)or IXSCAN (index scan). Right now, only a very few options in PMM QAN for MongoDB.

 

 

The option to filter based on COLLSCAN / IXSCAN can be done via the option system.profile.planSummary field. For example:

 

 

Roadmap item

https://www.notion.so/percona/MongoDB-CollScan-tracking-in-QAN-129674d091f380dcb463c4178d29f695

How to test

No perf tests needed.

Existing profiler data access and provisioning to users.

1. Start PMM and add MongoDB with profiler on.
2. Run queries to trigger some COLLSCAN, IXSCAN and other plan summaries.
Example:

Or use your own setup and queries.
3. Now go to QAN and see “Plan summary” filter group. Try filter by options there.

  1. Now select some query with plan summary “COLLSCAN” and go to details.

You should see “Full Scan” row. Also try add “Full Scan” as new column in QAN table.

See last column in table.

How to document

Just RN (highlights)

AFFECTED CS IDs

CS0038999

Attachments

4

Activity

Show:

Nailya Kutlubaeva February 10, 2025 at 9:47 AM

was verified

Tibor Korocz (Percona) October 28, 2024 at 8:12 AM

can you give us your opinion on this ?

Aaditya Dubey September 5, 2023 at 2:06 PM

Hi ,

Thank you for the report and feedback.

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Needs Doc

Planned Version/s

Fix versions

Story Points

Sprint

Start date

Due date

Smart Checklist

Created September 5, 2023 at 8:01 AM
Updated March 31, 2025 at 12:08 PM
Resolved February 10, 2025 at 10:20 AM