I have a domain object,defined as :
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Getter
@Setter
@Entity
@Table(name = "t_domin")
@Builder
public class Domain {
@Column(name = "BUSINESS_DATE")
private LocalDateTime businessDate;
@Column(name = "DATA_PROVIDER")
@Enumerated(EnumType.STRING)
private DataProvider dataProvider;
}
For the above domain Object I've Spring Repository:
@Repository
public interface DomainRepository extends JpaRepository<Domain, UUID> {
List<Domain> findByBusinessDate(LocalDateTime businessDate);
}
when I'm querying : repository.findByBusinessDate(someDate) --> I get 1000 records in more than a minute,where as same query if I run on db(oracle) I get the result-set within a sec.
I turned on the log (TRACE) ,I see that its taking more time in extracting the result set into list of java object:
TRACE o.h.type.descriptor.sql.BasicExtractor
How can i tune the performance ?