Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Effect of adding update statistics as part of the stored procedure Expand / Collapse
Author
Message
Posted Thursday, September 13, 2012 3:32 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, July 7, 2014 6:22 AM
Points: 231, Visits: 721
Hi,

What are the negative effects of running update statistics on few tables as part of stored procedure that has application logic?

Thanks.
Post #1358429
Posted Thursday, September 13, 2012 3:35 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 4, 2014 3:55 AM
Points: 2,836, Visits: 5,062
It takes some time to update statistics....

What are you doing exactly in your stored proc?
It can be well justified if it does modify big chunk of a table.


_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1358430
Posted Thursday, September 13, 2012 3:40 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 2:44 PM
Points: 42,443, Visits: 35,498
It takes time and it causes a recompile of the rest of the procedure and any other plans that use the statistics.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1358434
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse