Hikari號稱最快的連接池,這邊貼一個github上找到的一個宣稱最大化MySQL性能的配置文件(db.properties),供各位看官查看
1 #inner 2 jdbcUrl=jdbc:mysql://192.168.2.7:3306/lxd?useSSL=false 3 username=root 4 password=root 5 6 #pool properties 7 connectionTimeout=60000 8 idleTimeout=600000 9 minimumIdle=1 10 maximumPoolSize=50 11 #poolname 12 13 14 15 #datasource properties, max performance 16 #該項極大影響插入效率 17 dataSource.cachePrepStmts=true 18 dataSource.prepStmtCacheSize=250 19 dataSource.prepStmtCacheSqlLimit=2048 20 dataSource.useServerPrepStmts=true 21 dataSource.useLocalSessionState=true 22 dataSource.rewriteBatchedStatements=true 23 dataSource.cacheResultSetMetadata=true 24 #dataSource.cacheServerConfiguration=true 25 #dataSource.elideSetAutoCommits=true 26 dataSource.maintainTimeStats=false 27 dataSource.useCursorFetch=true