From b7de4b731e2185d010989a4f9e926db3112ccf87 Mon Sep 17 00:00:00 2001 From: zreed Date: Wed, 30 Jul 2014 11:35:10 -0400 Subject: [PATCH] Use prepared statement caching --- .../java/com/gmail/nossr50/database/SQLDatabaseManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index ac85092f6..ae4f4a0a4 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -48,6 +48,10 @@ public final class SQLDatabaseManager implements DatabaseManager { connectionProperties.put("user", Config.getInstance().getMySQLUserName()); connectionProperties.put("password", Config.getInstance().getMySQLUserPassword()); connectionProperties.put("autoReconnect", "false"); + connectionProperties.put("cachePrepStmts", "true"); + connectionProperties.put("prepStmtCacheSize", "64"); + connectionProperties.put("prepStmtCacheSqlLimit", "2048"); + connectionProperties.put("useServerPrepStmts", "true"); connectionPool = new ConnectionPool("mcMMO-Pool", 1 /*Minimum of one*/, Config.getInstance().getMySQLMaxPoolSize() /*max pool size */,