title: Update native query to slow
body: <p>I am using Hibernate with native query to update a field in a table with 17000 rows in Oracle.</p>
  
  <p>When I execute the query on Toad, it takes 0.5s to be executed and with the below code no finish ever. </p>
  
  <pre><code>Query query = em.createNativeQuery("UPDATE table SET field= LEAST(NUMERADOR/DENOMINADO, ? )");
  query.setParameter(1, value);
  query.executeUpdate();
  </code></pre>
  
  <p>This is the trace:</p>
  
  <pre><code>10-08 14:15:59 DEBUG JpaTransactionManager - Creating new transaction with name [es.package.app.repository.jpa.JPAValorMaximo.update]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
  10-08 14:15:59 DEBUG JpaTransactionManager - Opened new EntityManager [org.hibernate.ejb.EntityManagerImpl@405264e8] for JPA transaction
  10-08 14:15:59 DEBUG AbstractTransactionImpl - begin
  10-08 14:15:59 DEBUG LogicalConnectionImpl - Obtaining JDBC connection
  10-08 14:15:59 DEBUG LogicalConnectionImpl - Obtained JDBC connection
  10-08 14:15:59 DEBUG JdbcTransaction - initial autocommit status: true
  10-08 14:15:59 DEBUG JdbcTransaction - disabling autocommit
  10-08 14:15:59 DEBUG JpaTransactionManager - Exposing JPA transaction as JDBC transaction [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@1bbb3b9e]
  10-08 14:15:59 DEBUG SQL - UPDATE table SET field= LEAST(NUMERADOR/DENOMINADO, ? )
  Hibernate: UPDATE table SET field= LEAST(NUMERADOR/DENOMINADO, ? )
  </code></pre>
  
  <p>thanks</p>