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.
Author |
Topic |
nextaxtion
Yak Posting Veteran
54 Posts |
Posted - 2013-09-20 : 01:44:13
|
hi team, i have a procedure that do multiple calculation , insert, update , select data from tables, execute other procedures. My problen is that it is taking too much time to complete but i am not able to find which part of procedure is taking time. Is ther any way to get know the exact part of whole proc. I tried various method like profler and long rnning queries finding an activity monitor but that help nothing. Kindly suggest me correct approach.prithvi nath pandey |
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2013-09-20 : 03:02:39
|
The debug button? |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-09-20 : 08:32:20
|
quote: Originally posted by nextaxtion hi team, i have a procedure that do multiple calculation , insert, update , select data from tables, execute other procedures. My problen is that it is taking too much time to complete but i am not able to find which part of procedure is taking time. Is ther any way to get know the exact part of whole proc. I tried various method like profler and long rnning queries finding an activity monitor but that help nothing. Kindly suggest me correct approach.prithvi nath pandey
You can turn on "Query->Include Actual Execution Plan" option (Control-M), run the query and look at the execution plan. It will show you the relative costs of various parts in the stored procedure to help you narrow down where the bottlenecks are. Once you find those, you will get some clues.Another possibility is to insert debug statements within the stored procedure that prints out the elapsed time, so you can zero in on the parts that are consuming most time. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-09-22 : 02:30:36
|
You should also be able to find out time taken by individual parts through profiler. which template/counters were you using in profiler?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
|
|
|
|
|
|