• 1 Yes, if you do it in the same step, else it will look at modification count.

    2. https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

    Just beware that if you have a billion row table and there is one change, then the Ola script will rebuilt the stats(excluding any recent index stats if they were rebuilt) as it doesnt use thresholds for stats, just plain, modcounter>0.

    I'ave made a modification to exclude those if the modification count does not exceed 1% the rows in the table, which works for my purposes and massively reduced the stats rebuild window.

    Also, for an oltp, you may want to do async stats update, i.e. no waiting while stats are rebuilt as it will leave old stats there till new stats are complete.

    IF (@Version >= 10.504000 AND @Version < 11) OR @Version >= 11.03000

    BEGIN

    SET @CurrentCommand10 = @CurrentCommand10 + 'USE ' + QUOTENAME(@CurrentDatabaseName) + '; IF EXISTS(SELECT * FROM sys.dm_db_stats_properties (@ParamObjectID, @ParamStatisticsID) WHERE unfiltered_rows>0 and 1.0*modification_counter/[rows] > 0.01) BEGIN SET @ParamStatisticsModified = 1 END'

    END

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]