Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Performance

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2013-01-04 : 13:09:06
one application is working fine until yesterday and now the developers starting complaining about performance issue which is on database server side..

Please suggest how to find the which query is taking time and how to resolve it.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-04 : 21:15:16
use this for tracking long running queries

http://blog.extreme-advice.com/2012/10/22/capture-long-running-query-in-sql-server/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-04 : 21:16:10
Also look for any blocking issues while accessing the application pages concurrently by multiple users

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-05 : 10:48:08
Use this query to identify current executing queries. It also has information about any blocking session ids.
http://www.sqlserver-dba.com/2012/09/sql-server-current-queries-executing-on-sql-server.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2013-01-07 : 15:11:27
Thanks a lot for the answers..
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2013-01-07 : 15:12:34
I have one another question.

How to resolve the blocking issue.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2013-01-07 : 23:33:38
Search for it. There are lots of post for it.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-08 : 00:01:05
quote:
Originally posted by sqlfresher2k7

I have one another question.

How to resolve the blocking issue.


have a look at sp_who2 system procedure to start of

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

srimami
Posting Yak Master

160 Posts

Posted - 2013-01-16 : 09:44:09
Like visakh said, use sp_who2 and kill the sessions that are blocked with Kill session_id
Go to Top of Page

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2013-01-16 : 13:45:31
Killing sessions will free the blocks but will not fix the underlying problems. That can be a challenge to experienced DBA's


djj
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-17 : 01:44:13
An approach to solving the underlying problems is to identify queries with excessive locking delay issues. Use the Blocked Process Report - http://www.sqlserver-dba.com/2012/10/sql-server-find-queries-causing-lock-timeouts-per-second.html , set the relevant details.
Once you've identified the queries - there are various methods to optimise - such as:
Query tuning
Stored procedure versus adhoc queries
Analyse indexes – for example , if you have a heavily updated column don’t include it in a Clustered Index as it will will also lock the non clustered index via the row locator

Row versioning



Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -