Can SentryOne be modified to optimize this problem query with Reporting Services?

Tom Sweet 2017-04-26 19:20:10

This query is executed every 2 – 3 seconds and averages 55 seconds in duration. It is the highest Top SQL query in our production database by sorted by CPU usage.

Suril Jasani 2017-04-26 19:52:39

Can you also tell us what's listed in the Application column for those events (in the Top SQL tab)?



Tom Sweet 2017-04-26 19:54:21
"SentryOne 11.0-Server" is the application listed.
Suril Jasani 2017-04-26 20:04:31
Thank you. As Aaron suggested, please submit this to so we can have a closer look.
Aaron Bertrand 2017-04-26 19:33:29
I wonder if you need to keep that much ExecutionLog history or if you can purge some of the older data. I also can't think of a reason that should be running as frequently as you suggest – is it possible you created an Advisory Condition that looks at SSRS? What exactly is the application name in Top SQL? Could you provide a screen shot?

In any case, could you generate an actual plan after creating this index?

 CREATE INDEX IX_LastStartPerReport ON dbo.ExecutionLogStorage
   (ReportID, TimeStart DESC)
 WHERE ReportAction = 1;

There are some other index changes that could lead to further efficiencies, but this should take care of the problem exhibited when ExecutionLog gets rather large.

If adding indexes isn't supported at all (I'm not familiar with SSRS / ReportServer database support policies), or if that index doesn't help, please open a support ticket (e-mail Even if it does help, I'm still interested to find out what could be causing that query to run so often…