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.
Author |
Topic |
chetan06
Starting Member
11 Posts |
Posted - 2007-05-23 : 05:34:24
|
Hi friends..I have run Update statistics on one database (size approx 90GB).Now i have task of recompile all tables in the datatbase...can anybody help me on this..Cjain |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-23 : 05:40:33
|
define "recompiling tables"._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
chetan06
Starting Member
11 Posts |
Posted - 2007-05-23 : 05:49:25
|
can u please give me full syntex.........Cjain |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-23 : 05:51:31
|
full syntax for what???what do you mean by recompiling tabels?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
chetan06
Starting Member
11 Posts |
Posted - 2007-05-23 : 06:10:05
|
meaning recompiling all tables in db ..like --- EXEC sp_recompile titles ( This example causes the triggers and stored procedures that uses the titles table to be recompiled the next time they are run.)like wise i want to re-comile all tables in dbCjain |
 |
|
deepakontheweb
Starting Member
14 Posts |
Posted - 2007-05-23 : 06:14:43
|
sp_updatestatsRuns UPDATE STATISTICS against all user-defined tables in the current database.This example updates the statistics for tables in the pubs database.USE pubsEXEC sp_updatestats Check the sql books online for more details.Deepak KumarSQL Server MVP, MCDBAdeepak.kumar@sqlknowledge.com |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-05-23 : 07:08:57
|
I think what the OP is asking is how to recompile Sprocs and Triggers that are based on a table which has had its statistics updated.I reckon that sysdepends is "shot" on SQL2000 such that this cannot be done using sysdepends.(We monitor average execution time of Sprocs and recompile them when their average execution time falls off. Another way is to reboot your SQL Server periodically )Brett was asking something similar recently:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=83814Kristen |
 |
|
|
|
|