[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

exact queries that ran in a specific time..

in dm_exec_query_stats, I can check an aggregate of the queries that ran with
last_execution_time captured.. is it possible to see all the time that query ran?
0
25112
Asked:
25112
1 Solution
 
25112Author Commented:
the query I ran on "dm_exec_query_stats"
is

SELECT *
FROM sys.dm_exec_query_stats  
where last_execution_time between '2014-07-13 11:50:40.72' and '2014-07-13 11:52:40.72'
0
 
Marten RuneCommented:
It's an aggregate, so if the same query is also run on 11:53:00, you'll not see this with your query, when executed 11:54:00, I e select... From sys.dm_exec_query_stats.

perhaps a trace with a filter on database and duration is a better approach on how to identify your problem query (if any, keep in mind that applications like to accuse SQL, when in fact the application is behaving badly).

don't forget to ensure that index maintenance is configured before you try to find culprits against the SQL server service.

regards Marten
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now