Tomcat中的PreparedStatement缓存 [英] PreparedStatement caching in Tomcat

查看:167
本文介绍了Tomcat中的PreparedStatement缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种实现PreparedStatement缓存的方法,以节省为过去已经执行过的查询重新创建PreparedStatement对象的过程.

I am looking for a way to achieve PreparedStatement caching, so as to save recreating the PreparedStatement objects for queries that were already executed in the past.

是否有一些内置的方法可以使用Tomcat实现此目的?还是我必须自己编写此缓存?

Is there some built in way to achieve this using Tomcat? Or must I program this cache myself?

推荐答案

我相信tomcat使用 commons-dbcp 和commons-dbcp支持预备语句池.

I believe tomcat uses commons-dbcp and commons-dbcp supports prepared statement pooling.

此处查看.

poolPreparedStatements false对此池启用预备语句池.

poolPreparedStatements false Enable prepared statement pooling for this pool.

这篇关于Tomcat中的PreparedStatement缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆