Scanned Object / returned has gone over 1000, but profiler is empty

Hi guys,
My company have a cluster tier M20 on Atlas. We receive a lot of warning “Scanned Object / returned has gone over 1000”. In the past I proceed to create (a lot of) indexes to optimize our query and the graph of the “examined:Returned ratio” graph show us the improvments: the worst case is returned ratio of 5.

That’s great, however the alerts didn’t disappear but if I check the graph in the profiler he didn’t show anything to worry. There are no suggestions to create index, also

How can I find the query or the queries that caused the alerts?

Hello @Luca_Fongaro,

The Query Profiler displays slow-running operations and their key performance statistics.

As a default setting, Atlas exclusively captures queries that exhibit execution times exceeding 100 milliseconds, categorizing them as “slow queries.”

In the event that the profiler remains devoid of entries, a plausible explanation may be that the queries in question were characterized by expeditious execution, consistently falling within the stipulated threshold.

1 Like

Hi, thanks for the reply.

If I understand correctly, there isn’t a way to show the queries which cause the alert?

Hello,

The only way that you can do this is using db.setProfilingLevel() to slowms to 0, e.g:

db.setProfilingLevel(0,-1)

However, this should be done with caution because it will log all operations and has the potential to impact performance and use up disk space if left enabled for too long. You would need to run this on each mongod/mongos where you want to increase logging. If you enable this in many instances it could be very easy to forget to set it back to previous levels and I advise against doing this unless absolutely necessary.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.