performance - MS SQL Server- Efficient Stored Procedures Issue -


i have lot of data need insert process based on history of data in database. entails initial insert ... values command , slew of queries, calculations, , subsequent insert ... select from appending queries.

the actual processing part of work general stored procedure wrap unique initial insert ... values packaged stored procedure.

when run single day's stored procedure, takes 6 minutes. when try run multiple day's stored procedures in same ssms execution, seems take longer 6 minutes per call. if stop stored procedure after while, seems has completed hung @ end reason.

are there red flags in described show might doing inefficiently? find wrapping packaged stored procedure in begin ... end clause helps not always.

sample code:

--step 3 dailydataprocess  -summary query -calculation query join summary query -select temp tables -insert select query -more summary , calculation queries -final insert select query -update yesterday's data event occured  --step 2 packagedsp1  insert initialtable (col 1, col 2, todaysdate)  values (1, 2, 8/14/2017)   execute dailydataprocess  --step 1 multicall  begin execute packagedsp1 end begin execute packagedsp2 end begin execute packagedsp3 end begin execute packagedsp4 end 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -