Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Query Runtime

Posted on 2011-02-24
2
Medium Priority
?
243 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 40

Accepted Solution

by:
lcohan earned 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

783 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