You are here: Re: Does truncate and API Load invalidate statistics « MsSQL Server « IT news, forums, messages
Re: Does truncate and API Load invalidate statistics

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация