java C3P0 max 语句配置?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15087314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 18:26:10  来源:igfitidea点击:

C3P0 max statements configuration?

javac3p0

提问by user1016403

I am using C3P0. i have below configuration. i need to cache the statements.

我正在使用 C3P0。我有以下配置。我需要缓存这些语句。

maxPoolSize="20" 
minPoolSize="6" 
acquireIncrement="3"
initialPoolSize="3"
maxStatements="2000" 

here i have set maxStatementsto 2000. maxPoolSizeis 20. does it mean total 2000*20=40000 statements wil be cached?

在这里,我已设置maxStatements2000maxPoolSize20。这是否意味着总共会缓存 2000*20=40000 条语句?

Thanks!

谢谢!

采纳答案by Gareth Davis

no maxStatementsis the global cache max size.

nomaxStatements是全局缓存最大大小。

maxStatementsPerConnectionis the per connection value.

maxStatementsPerConnection是每个连接值。

Relevant section the c3p0 docs

c3p0 文档的相关部分