title: SQL SERVER INSERT STATEMENT WITH LOOP Needs Optimized
body: <p>I have SQL Statement running in SQL server 2014. 
  I have 3 columns: id, text1, text2 
  Inserting records in text1, text2
  text1 is nvarchar
  text2 is  varchar
  so far inserted 1.2 million rows in about 3.5 hrs
  trying to insert 3 million need help in reduce time for insert</p>
  
  <p>CODE:
  </p>
  
  <pre><code>DECLARE @i as int  
  SET @i  = 0 
  
  WHILE  @i &lt; 3000000
  BEGIN
      SET @i = @i + 1
      insert into test (text1 , text2)
      values(N'你好','VJ'+ cast(@i as varchar(20)))
  END
  </code></pre>