I created a second DataSource in my application.
I created it with HikariDataSource, since I had problems because it was disconnected.
Now it does not disconnect, but it is very slow
My configuration is the following:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
jdbcUrl: jdbc:postgresql://xxx/xxx_pm
username: xxx
password: xxx
hikari:
idle-timeout: 10000
java:
@ConfigurationProperties(prefix = "spring.datasources.xxx")
public class DatabaseXXXConfiguration extends HikariConfig{
@Bean(name = "xxxDataSource")
public DataSource dataSource() throws SQLException {
return new HikariDataSource(this);
}
Can someone tell me how to improve performance.
They are small queries of tables with pagination of about 25 records and takes 4 seconds.
I have observed that a query that is 200 records of a select, takes 46 seconds, before it did in 2 seconds.
Before, they were thousandth of seconds.
Thank you.