title: Spring Batch JdbcBatchItemWriter
body: <p>I'm using a chunk step with a reader and writer. The reader is using a JdbcPagingItemReader with a high page size of 5000. The writer is using JdbcBatchItemWriter with a  commit-interval of 5000 on the chunk step.</p>
  
  <pre><code>    &lt;batch:step id="createRecords"&gt;
                      &lt;tasklet  allow-start-if-complete="true" &gt;
                          &lt;chunk reader="readTable"  writer="createNewRecords" 
                                 commit-interval="5000" skip-limit="100" &gt;
                         &lt;skippable-exception-classes&gt;
                         &lt;batch:include class="java.lang.Exception"/&gt;
                         &lt;/skippable-exception-classes&gt;
                          &lt;/chunk&gt;
                      &lt;/tasklet&gt;
  &lt;/batch:step&gt;
  </code></pre>
  
  <p>When I'm using this chunk step to load records everything works as I would expect. It inserts records 5000 at a time (when ther'es no errors) and the performance is as expected. 10000 records are processed in under a minute etc.</p>
  
  <p>However when I use the same chunk step (exact same reader) and change the SQL used by the writer to do an UPDATE statement ( as in a basic SQL update as oppose to an INSERT) the application takes up to 30+ minutes to do an update for 50K records which is poor. A single update statement in SQL (which is almost identical) for the whole table runs in under seconds. I'd like to take advantage of the batch processing if this is possible. </p>
  
  <pre><code>     &lt;bean id="createNewRecords" class="org.springframework.batch.item.database.JdbcBatchItemWriter"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;   
      &lt;property name="sql"&gt;
          &lt;value&gt;
              &lt;![CDATA[        
              UPDATE  TABLE SET TABLE_COLUM = :test
              ]]&gt;
          &lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="itemSqlParameterSourceProvider"&gt;
          &lt;bean class="org.springframework.batch.item.database.BeanPropertyItemSqlParameterSourceProvider" /&gt;
      &lt;/property&gt;        
  &lt;/bean&gt;
  </code></pre>
  
  <p>Wondering does this sound like a config problem - or are update statements treated differently by spring batchs JdbcBatchItemWriter??</p>