我在mysql中遇到类似的性能问题,并通过在连接URL中设置useServerPrepStmts和rewriteBatchedStatements属性来解决。
Connection c = DriverManager.getConnection("jdbc:mysql://host:3306/db?useServerPrepStmts=false&rewriteBatchedStatements=true", "username", "password");
我在mysql中遇到类似的性能问题,并通过在连接URL中设置useServerPrepStmts和rewriteBatchedStatements属性来解决。
Connection c = DriverManager.getConnection("jdbc:mysql://host:3306/db?useServerPrepStmts=false&rewriteBatchedStatements=true", "username", "password");