Hi,

I faced a performance issue with Spring Data Jdbc with native application. It isn't easy to prepare a demo cause I found this issue in the production code. But I will try to explain.

Let's say I have a simple Spring Data repository:

public interface DemoJdbcRepository extends CrudRepository<DemoEntity, Long> {
        @Query("select d.* from demo_table d where d.status in (:statuses)")
        List<DemoEntity> getDemoByStatusId(@Param("statuses") Set<Integer> statuses);
}

In demo_table I have 600,000 records for searched statuses. For Java applications, this method takes an average of 5 sec. When I switched to the native application, this method took more than 100 sec. I prepared a flame graph for native application: perf-native-spring-data

Could you please explain if it is expected behavior for native? and maybe we can improve the performance of Spring Data somehow

Comment From: mhalbritter

Hey,

this is better suited for the Spring Data JDBC bugtracker.