exact queries that ran in a specific time..

Posted on 2014-07-16
Last Modified: 2014-07-23
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?
Question by:25112
    LVL 5

    Author Comment

    the query I ran on "dm_exec_query_stats"

    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'
    LVL 20

    Accepted Solution

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now