|
Posted by Erland Sommarskog on 08/16/06 21:29
rcamarda (robc390@hotmail.com) writes:
> As part of my data warehouse nightly build, I truncate my tables in my
> target database.
> As example, I find it is much quicker to do a bulk API load of 13M
> records and to do an update/insert of 100K rows. I also drop the
> indexes before the builds and reindex after. Thats an aside.
> What I am wondering is how is this impacting the statistics? Do I need
> to update them?
When an indexes added, statistics based a full scan is added for that
index, so you are fairly safe.
Would could matter is statistics of non-indexed columns. These you lose
when you truncate the tables. These statistics are less essential than
index on indexed columns, but there are queries where they may be useful.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|