Provide offending query shape in Query Targeting alert notifications
It would be ideal if the alert notifications for Query Targeting ratio alerts included a reference to the query shape that caused the alert to fire. This would assist customers in locating the exact query/queries with poor targeting ratios so that they can be optimized in a more expeditious manner.
![](https://secure.gravatar.com/avatar/a319eb13d1bbb8f7965dbdfe25347acc?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Konstantin commented
I agree. It's really bad if you get an alert and have to start digging and learn tooling to find out which query the alert was probably about,
-
Alexander commented
Actually the DB and the collection(s) would be a good start, but right now there is no chance to identify these queries but to log all queries to the profiler.
Especially on dev systems where the queries may not be slow (so profiler mode 1 with eg 50ms does not hit), but still not performant, the DB, collection and shape would be very good to get. This way queries can be optimized before getting into prod. -
Locus commented
If the system knows all the queries which were running at the time the alert was generated, it only makes sense to send the query shape with the Alert - OR - if that information is not immediately available, it still makes sense to send one email per query shape with an issue so that the customer can look into each query shape separately and mitigate.