Solved

SQL Query Runtime

Posted on 2011-02-24
2
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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 SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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