title: Spring JDBC Template batchUpdate to update thousands of records in a tbale
body: <p>I have an update query which I am trying to execute through batchUpdate method of spring jdbc template. This update query can potentially match 1000s of rows in EVENT_DYNAMIC_ATTRIBUTE table which needs to be get updated. Will updating thousands of rows in a table cause any issue in production database apart from timeout? like, will it crash database or slowdown the performance of entire database engine for other connections...etc?</p>
  
  <p>Is there a better way to achieve this instead of firing single update query in spring JDBC template or JPA? I have the following settings for jdbc template.</p>
  
  <pre><code>this.jdbc = new JdbcTemplate(ds);
  jdbc.setFetchSize(1000);
  jdbc.setQueryTimeout(0); // zero means there is no limit
  </code></pre>
  
  <p>The update query:</p>
  
  <pre><code>UPDATE EVENT_DYNAMIC_ATTRIBUTE eda
     SET eda.ATTRIBUTE_VALUE = 'claim',
         eda.LAST_UPDATED_DATE = SYSDATE,
         eda.LAST_UPDATED_BY = 'superUsers'
   WHERE     eda.DYNAMIC_ATTRIBUTE_NAME_ID = 4002
         AND eda.EVENT_ID IN
                (WITH category_data
                         AS (    SELECT c.CATEGORY_ID
                                   FROM CATEGORY c
                             START WITH CATEGORY_ID = 495984
                             CONNECT BY PARENT_ID = PRIOR CATEGORY_ID)
                 SELECT event_id
                   FROM event e
                  WHERE EXISTS
                           (SELECT 't'
                              FROM category_data cd
                             WHERE cd.CATEGORY_ID = e.PRIMARY_CATEGORY_ID))
  </code></pre>