title: Spring jpa query-simple select query takes too much time
body: <p>Below Employee table(Oracle DB) has 5000 active employees.
  From SQL client,query takes time in ms but same query when being invoked from
  service class as below takes around 2 minutes.</p>
  
  <p>There is no association from employee entity to another entity.
  So not an issue of EAGER fetching.</p>
  
  <p>As suggested <a href="https://stackoverflow.com/questions/6609645/simple-hibernate-query-returning-very-slowly">here</a> tried all argument constructor but it did not help.</p>
  
  <p>Employee class has around 25 attributes.</p>
  
  <p>Is the time spent in converting result set into entity object?</p>
  
  <pre><code>  employeeRepo.findAllByStatus("active")
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code> class EmployeeRepository extends JpaRepository&lt;Employee,Long&gt;{
  
             List&lt;Employee&gt; findAllByStatus(String status);
    }     
  
    @Data
    @Entity
    @Table(name="emp_master")
    @NoArgsConstrucor
    class Employee{
  
       @Id
        private Long id;
  
        @Coulmn(name="status")
        private String status;
  
        @Column(name="LEAVER_DATE")
        @Convert(DateToLocalDateTimeConverter.class)
        private ZonedDateTime leaverDate;
  
        few string and Integer varibales...
    }
  </code></pre>
  
  <p>DateToLocalDateTimeConverter converts sql timestamp to ZonedDateTime</p>