Oracle – Connection Pool Size concept in Oracle

connectionconnection-poolingdatabase connectionjdbcoracle

Initial and Minimum Pool Size

The minimum number of connections in the pool. This value also determines the number of connections placed in the pool when the pool is first created or when application server starts.

Maximum Pool Size

The maximum number of connections in the pool.

According to the above 2 definitions, if the min pool size is 1 and max pool size is 100 then:

  1. When the pool is first created or when application server starts then only one connection is newly created.
  2. There will be many requests hitting concurrently in the day and will definitely require more connection which will be made in the course of the day which can reach max to 100. But while these connections are made they are not removed from pool until the application server shuts down or we remove the entire pool?

Am I right for these two points?

Best Answer

The pool size will stay between the limits you describe. As a general idea:

  • Concept #1 is correct.

  • Concept #2 depends on the JDBC connection pool. Typically the connection pool is able to grow and shrink according to the observed usage during the day. Heavy load will make it grow while idleness will make it shrink.

In any case, every JDBC connection pool behaves a little bit differently, so you should check the specific connection pool you want to use.