Bonecp is currently the fastest database connection pool component, which is the bonecp configuration + annotation.
# Bonecp properties <br/> # Number of partitions <br/> bonecp. partitioncount = 1 <br/> # minimum number of connections contained in each partition <br/> bonecp. minconnectionsperpartition = 1 <br/> # maximum number of connections contained in each partition <br/> bonecp. maxconnectionsperpartition = 2 <br/> # Number of new connections each time <br/> bonecp. acquireincrement = 1 <br/> # connection pool threshold. When the available connection/maximum connection <connection threshold value, create a new connection <br/> bonecp. poolavailabilitythreshold = 20 <br/> # connection timeout threshold value. If the threshold value is exceeded, the connection fails to be obtained, in milliseconds. <br/> bonecp. connectiontimeout = 10000 <br/> # Number of connection pool assistant threads, which can be set to 0. This parameter reduces the running speed, but when a program has a large number of connections, helps Improve the Performance of High-concurrency programs <br/> bonecp. releasehelperthreads = 0 <br/> # Number of statement assistant threads, which can be set to 0. This parameter reduces the running speed. However, when a program has a large number of query statements, helps Improve the Performance of High-concurrency programs <br/> bonecp. statementreleasehelperthreads = 0 <br/> # interval of test connection validity, in minutes <br/> bonecp. idleconnectiontestperiod = 60 <br/> # idle time of the connection. When the idle time of the connection exceeds the threshold, clear the connection. <br/> bonecp. idlemaxage = 240 <br/> # Number of statement caches. The default value is 0. <br/> bonecp. statementscachesize = 5