I have an application that uses a single database on MS SQL Server. I need to learn some statistics about application requests to database to analyse it and improve performance.
Basically I need kind of a summary of information that is displayed in Recent Expensive Queries in Activity Monitor of SQL Server Management Studio. The most important thing to know is total number of executions of the query for definite period of time (working time of a heavy function). Please, take into consideration that a query in Activity Monitor looks like that:
SELECT [A],[B],[C] FROM [Table] WHERE [ID]=@1
so, there are often same query but with different parameter(s).
Please, let me know the options for gathering such data or just share your ideas of "how to". I will learn and try it and write about the results.
Thanks!