Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C3P0 max statements configuration?

Tags:

java

c3p0

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

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

here i have set maxStatements to 2000. maxPoolSize is 20. does it mean total 2000*20=40000 statements wil be cached?

Thanks!

like image 249
user1016403 Avatar asked Feb 26 '13 10:02

user1016403


1 Answers

no maxStatements is the global cache max size.

maxStatementsPerConnection is the per connection value.

Relevant section the c3p0 docs

like image 157
Gareth Davis Avatar answered Oct 22 '22 14:10

Gareth Davis