Solved

SQL Query Runtime

Posted on 2011-02-24
2
221 Views
Last Modified: 2012-05-11
Hello All:
   Try to find a way to see if there are any existing SQL function or commands that measure last ran query run time. Like how @@rowcount or @@PROCID is used
0
Comment
Question by:pengbsam
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
ID: 34971218
You could code your own datetime variables just before and immediately after your query to capture that however if you want to see that for debugging purpose use SET STATISTICS TIME ON in your session then execute your query and check results. Another extremely useful setting is SET STATISTICS IO ON
0
 
LVL 5

Expert Comment

by:jijeesh
ID: 34971696
If you use sql profiler you can see the query history.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
GRANT, REVOKE, DENY 4 36
SQL Server - Check Constraint or NOT NULL? 11 67
testing sql16 on win10 vs OS16 2 32
TSQL previous 5 22
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A short film showing how OnPage and Connectwise integration works.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

14 Experts available now in Live!

Get 1:1 Help Now