Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a Spoc that has insert statements. There was no code change. But since past 2 weeks it has been taking 50% more time to execute. Would anybody be able to help me in understanding what could have made this?.
Posted
Comments
George Jonsson 2-Nov-14 6:17am    
Is it the time to do the insert or the total time including response time?
Maybe you should look at the size of the table(s) you are inserting data into.
Also check if more tasks have been added to the server. Maybe it is shared by many resources.

Just by looking at the question, it's very difficult to pinpoint what is the real reason.

However, you need to look at the following factors:

1.) Has there been a substantial change in the dataset i.e. the amount of data your database/tables.

2.) Usually, SQL Server keeps an optimal execution plan saved for the stored procs. Clearing the execution plan, patching etc. resets those plans and a new plan is created. You new plan might be making different or incorrect assumptions. Check the execution plan [^]using SQL Profiler.

3.) Please use SQL Profiler[^] to see what's going on. It's your best bet.

4.) Understand that NO CODE CHANGE is not the only factor which impacts performance and their are lot of other factors involved.
 
Share this answer
 
Comments
Maciej Los 2-Nov-14 6:26am    
+5!
Manas Bhardwaj 2-Nov-14 6:30am    
Thanks :)
I agree with Manas Bhardwaj and suggest you to read about database / query performance[^]. There is few ways to improve the time of query execution.
 
Share this answer
 
Comments
Manas Bhardwaj 2-Nov-14 6:34am    
+5.

Always good to refer existing articles on CP. More efficient than asking questions.
Maciej Los 2-Nov-14 7:18am    
Thank you, Manas ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900