title: Saving entity using crudrepository taking too much time
body: <p>I am trying to update an entry in the DB using crudrepository but its taking ~ 24 seconds for each iteration. Below is the code. Thanks in advance.</p>
  
  <pre><code>for(tmp.request.Number numb : Num_list){
              EnterpriseVnumbList addNumb = entNumbdao.findByVnumbmsisdnAndEnterpriseid(numb.getNumber(), frmEntp);
  
              if(addNumb != null){
  
                  addNumb.setEnterpriseId(toEntp);                     // toEnt is a class Enterprise
                  entNumbdao.save(addNumb); // entNumbdao is EnterpriseVnumbListRepo 
                  addEntpToEnt++;
              }else{
                  log.error("NumbProcessing: Failed to");              
              }     
  </code></pre>
  
  <p>Here is my EnterpriseVnumbList class </p>
  
  <pre><code>@Entity
  @Table(name = "enterprise_vnumb_list", uniqueConstraints = {
          @UniqueConstraint(columnNames = {"vnumb_msisdn"})})
  @XmlRootElement
  public class EnterpriseVnumbList implements Serializable {
      @Size(max = 10)
      @Column(name = "parent_id")
      private String parentId;
      private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Basic(optional = false)
      @Column(name = "id", nullable = false)
      private Long id;
      @Basic(optional = false)
      @NotNull
      @Size(min = 1, max = 30)
      @Column(name = "vnumb_msisdn", nullable = false, length = 30)
      private String vnumbmsisdn;
      @Size(max = 30)
      @Column(name = "imsi", length = 30)
      private String imsi;
      @Column(name = "assigned")
      private Boolean assigned;
      @Size(max = 30)
      @Column(name = "assigned_to_sim", length = 30)
      private String assignedtosim;
      @JoinColumn(name = "enterprise_id", referencedColumnName = "enterprise_id", nullable = false)
      @ManyToOne(optional = false)
      private Enterprise enterpriseid;
  /// Some code here
  }
  </code></pre>
  
  <p>// Here is EnterpriseVnumbListRepo class </p>
  
  <pre><code>@RepositoryDefinition(domainClass=EnterpriseVnumbList.class, idClass=Integer.class)    
  public interface EnterpriseVnumbListRepo extends CrudRepository&lt;EnterpriseVnumbList, Integer&gt;, JpaSpecificationExecutor&lt;EnterpriseVnumbList&gt;{
      EnterpriseVnumbList findByVnumbmsisdnAndEnterpriseidAndAssigned(String vsim, Enterprise enterpriseid, boolean assgn);
      EnterpriseVnumbList findByVnumbmsisdnAndEnterpriseid(String vsim, Enterprise enterpriseid);
      List&lt;EnterpriseVnumbList&gt; findByEnterpriseidAndAssigned(Enterprise entp, boolean assgn);
      EnterpriseVnumbList findByVnumbmsisdnAndAssignedtosim(String vsim, String sim);
      EnterpriseVnumbList findByVnumbmsisdnAndEnterpriseidAndAssignedNot(String vsim, Enterprise enterpriseid, boolean assgn);
      Long countByEnterpriseidAndAssigned(Enterprise entp, boolean assgn);
      Long countByEnterpriseid(Enterprise entp);
  } 
  </code></pre>