title: Slow insert and saveall performance on spring data cassandra repository
body: <p>I am trying to insert 1500 records using spring into cassandra. I have a list of POJOs which hold these 1500 records and when I call saveAll or insert on this data it takes 30 seconds to complete this operation. Can someone suggest a way for me to get this done faster? I am currently running Cassandra 3.11.2 as a single node Test cluster.</p>
  
  <p>Entity POJO:</p>
  
  <pre><code>package com.samplepoc.pojo;
  
  import static org.springframework.data.cassandra.core.cql.PrimaryKeyType.PARTITIONED;
  import java.util.Date;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.UUID;
  
  import org.springframework.data.cassandra.core.mapping.Column;
  import org.springframework.data.cassandra.core.mapping.PrimaryKeyColumn;
  import org.springframework.data.cassandra.core.mapping.Table;
  
  @Table("health")
  public class POJOHealth
  {
      @PrimaryKeyColumn(type=PARTITIONED)
      UUID primkey;
      @Column
      String col1;
      @Column
      String col2;
      @Column
      String col3;
      @Column
      String col4;
      @Column
      String col5;
      @Column
      Date ts;
      @Column
      boolean stale;
      @Column
      String col6;
      @Column
      String col7;
      @Column
      String col8;
      @Column
      String col9;
      @Column
      Map&lt;String,String&gt; data_map = new HashMap&lt;String,String&gt;();
  
      public POJOHealth(
               String col1,
               String col2,
               String col3,
               String col4,
               String col5,
               String col6,
               String col7,
               String col8,
               String col9,
               boolean stale,
               Date ts,
               Map&lt;String,String&gt; data_map
               )
      {
          this.primkey = UUID.randomUUID();
          this.col1=col1;
          this.col2=col2;
          this.col3=col3;
          this.col4=col4;
          this.col5=col5;
          this.col6=col6;
          this.col7=col7;
          this.col8=col8;
          this.col9=col9;
          this.ts=ts;
          this.data_map = data_map;
          this.stale=stale;
      }
  
      //getters &amp; setter ommitted
  }
  </code></pre>
  
  <p>Persist Service snippet:</p>
  
  <pre><code>public void persist(List&lt;POJO&gt; l_POJO)
  {
          System.out.println("Enter Persist: "+new java.util.Date());
  
          List&lt;l_POJO&gt; l_POJO_stale = repository_name.findBycol1AndStale("sample",false);
          System.out.println("Retrieve Old: "+new java.util.Date());
  
          l_POJO_stale.forEach(s -&gt; s.setStale(true));
          System.out.println("Set Stale: "+new java.util.Date());
  
          repository_name.saveAll(l_POJO_stale);
          System.out.println("Save stale: "+new java.util.Date());
  
          try 
          {
              repository_name.insert(l_POJO);
          } 
          catch (Exception e) 
          {
              System.out.println("Error in persisting new data");
          }
          System.out.println("Insert complete: "+new java.util.Date());
  }
  </code></pre>