Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_updatestats vs UPDATE STATISTICS

Status
Not open for further replies.

DBAWinnipeg

Programmer
Apr 14, 2004
173
CA
Does anyone know what exactly sp_updatestats does?

It says it updates the stats for ALL user tables but I find that in running sp_updatestats performance does not increase as much as if I run UPDATE STATISTICS.

so what's I'm wondering is, is does sp_updatestats just do the stats it "thinks" it should do... or ALL stats without prejudice.



Thanks in advance!!!

Colin in da 'Peg :)
 
AFAIK sp_updatestats simply runs UPDATE STATISTICS [WITH RESAMPLE] over all user tables. Other options like WITH FULLSCAN and WITH SAMPLE <x> ROWS|PERCENT are not available that way.

To eliminate all doubts, you can see source code for this stored procedure in masterdb.

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top