Query Targeting: Scanned Objects / Returned has gone above 1000

Hello Team,

Recently in our production environment we are getting the following alert “Query Targeting: Scanned Objects / Returned has gone above 1000” continuously at least twice a week but when our team checks the profiler during the time of alert all the queries execution time was not more than 50ms and also all the queries which were running during the time of alert was insert queries.
Even in performance advisor I didn’t get any suggestion to add new index based on the generated alerts. Can you please help me with this since it is production platform we are worried about this alert

Hi @Vignesh_Ramesh,

Welcome to MongoDB community.

I think the best for you to contact our Atlas support to look into your production specific workload.

High query targeting usually indicate on suboptimal queries as more documents are scanned vs returned. However, if you don’t see ant impact in actual performance this alert might not be critical for you and you may ignore it or tune the threshold to fit your monitoring needs.


1 Like

How I can tune it so that it works properly? via indexing?

@Chris_Heffernan Usually yes, but it depends on the specific env.

Look into performance advisor to see if anything is suggested.