DEFINITIONS

Definitions More Info.
Definition ID306
TitleSQL
CategoryNOTES
DefinitionUpdate Statistics Pararlel Work Thread Manuel
Definition Descriptionhttp://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/95820/ select t.name as [tname] , ' update statistics ['+t.name+'] ' [comando] from sys.tables t left join sys.stats s on t.object_id = s.object_id join ( select object_id , sum(rows) rows from sys.partitions group by object_id having SUM(rows) >0 ) pa on t.object_id = pa.object_id where ( STATS_DATE(t.object_id,stats_id) is null or datediff(DAY, STATS_DATE(t.object_id,stats_id), GETDATE() ) >=3 ) group by t.name order by 1
RecordBycunay
Record Date07-02-2013 11:33:53
Düzenle
Kopyala
Sil