Produce a long running queries report ordered by average execution time
I have been tasked with identifying queries with the longest average execution time so that they can be targeted for optimization. In the server overview this can be done in the top queries section, however this obviously only shows queries for that instance.
In the reporting tab I can create a report for long running queries, but it is based around total execution time. It would be useful if this could be ordered by average execution time.
A query that runs 100,000 times and takes 10ms will have a higher overall execution time than one that runs 50 times and takes 10s, however this is the one that we think would benefit most from optimization.