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
 General SQL Server Forums
 New to SQL Server Programming
 Update Statistics in SP.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2012-05-07 : 04:53:11
Dear All,

I want to use Update Statistics in store procedure.
My SP is executing millions of record on single table, So I want to execute following statement in end of SP.

Can anyone please tell me how to resolve this issue ?

UPDATE STATISTICS tb_lcr_rate_deck_created_rate_TEMP;

Thanks and Regard's
Harish Patil

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2012-05-07 : 10:45:58
Are you getting an error?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-07 : 16:27:19
is it batch insert procedure? do you know that this would cause procedure to recompile each time? So unless there's a strong reason you shouldnt be doing this inline

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

Go to Top of Page
   

- Advertisement -