title: How to avoid the SQL Server's "rebuild statistics" when doing performance testing?
body: <p>I'm doing some SQL tuning these days and find one weird sql during the test:</p>
  
  <pre><code>SELECT StatMan([SC0],[SC1], [SB0000]) 
  FROM (SELECT TOP 100 PERCENT [SC0],[SC1], step_direction([SC0]) over (order by NULL) AS [SB0000]  
        FROM (SELECT [tableA] AS [SC0],[tableB] AS [SC1] 
              FROM [dbo].[url] WITH (READUNCOMMITTED,SAMPLE 3.408654e+000 PERCENT) 
             ) AS _MS_UPDSTATS_TBL_HELPER 
       ORDER BY [SC0],[SC1], [SB0000] 
      ) AS _MS_UPDSTATS_TBL  
  OPTION (MAXDOP 1)
  </code></pre>
  
  <p>Looks this is doing some "reindex" or "rebuild" some db index according to SQL Server. But my question is how can we avoid this during the long load test besides "reindex" for each tables before the testing.</p>
  
  <p>And this SQL will consume 16862ms because of my table contains enough rows. And there are many <em>insert</em> action in my test.</p>