PreparedStatement缓存开启

语言: CN / TW / HK

数据库 配置样式

mysql

 

  config.addConnectProperty("cachePrepStmts", "true");
  config.addConnectProperty("prepStmtCacheSize", "50");
  config.addConnectProperty("prepStmtCacheSqlLimit", "2048");
  config.addConnectProperty("useServerPrepStmts", "true");
mariadb 同上
Oracle config.addConnectProperty("oracle.jdbc.implicitStatementCacheSize", "50");
postgresql config.addConnectProperty("extendedCacheEverything", "true");  
config.addConnectProperty("preparedStatementCacheQueries", "50");
   
   
   

待续

 

分享到: