On the HikariCP page on the page on MySQL performance tips.
https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
It suggests using 4 properties namely
prepStmtCacheSize
prepStmtCacheSqlLimit
cachePrepStmts
useServerPrepStmts
I am confused whether these properties go to dataSource block at the same level as dbCreate and dialect or do they go inside properties block.
dataSource {
pooled = true
dbCreate = "none"
url = "jdbc:mysql://localhost:3306/dev2?useUnicode=yes&characterEncoding=UTF-8"
driverClassName = "com.mysql.cj.jdbc.Driver"
dialect = org.hibernate.dialect.MySQL8Dialect
prepStmtCacheSize = 400
prepStmtCacheSqlLimit = 2048
cachePrepStmts = true
useServerPrepStmts = true
type = "com.zaxxer.hikari.HikariDataSource"
properties {
connectionTimeout = 200000
maximumPoolSize = 50
}
}
or this
dataSource {
pooled = true
dbCreate = "none"
url = "jdbc:mysql://localhost:3306/dev2?useUnicode=yes&characterEncoding=UTF-8"
driverClassName = "com.mysql.cj.jdbc.Driver"
dialect = org.hibernate.dialect.MySQL8Dialect
type = "com.zaxxer.hikari.HikariDataSource"
properties {
connectionTimeout = 200000
maximumPoolSize = 50
prepStmtCacheSize = 400
prepStmtCacheSqlLimit = 2048
cachePrepStmts = true
useServerPrepStmts = true
}
}