Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Performance Tuning
»
SQL Profiler - Can it tell you how long query...
SQL Profiler - Can it tell you how long query was blocked for
Rate Topic
Display Mode
Topic Options
Author
Message
neil-560592
neil-560592
Posted Thursday, November 20, 2008 3:39 AM
SSC Rookie
Group: General Forum Members
Last Login: Wednesday, March 13, 2013 5:18 AM
Points: 46,
Visits: 399
Hi, I often have situations where a lot of queries time out. However most queries time out because they are blocked by other long running queries, rather than themselves taking a long time to run (due to table scans etc). Is there any way to get SQL profiler to indicate only those queries that have long durations only as a result of themselves taking a long time to run, rather than spending all their time blocked?
Thanks
Post #605674
Jack Corbett
Jack Corbett
Posted Thursday, November 20, 2008 7:49 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
I don't believe that there is a way to do that directly in profiler. I think you could figure that out by using a combination of the lock timeout event and the CPU and duration columns of the SP:Completed or SQL:StmtCompleted events as I do not believe a process waiting for a lock to be released is using CPU time.
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #605827
colin.Leversuch-Roberts
colin.Leversuch-Roberts
Posted Thursday, November 27, 2008 4:47 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:10 PM
Points: 2,668,
Visits: 688
just a point here - generally queries only time out from the client dropping the connection not as an internal SQL Server operation unless it's a deadlock. If you set a block using a couple of sql queries you'll find they'll tend to sit there until the end of time.
I run a profiler which captures long running queries based upon duration, but you won't really know a query is long running until it's finished.
It's not difficult to query the dmvs to gather what you need either but sorting out waht's blocked and just running may be trickier
The GrumpyOldDBA
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
Post #609692
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.