Connection Pool Size concept in Oracle

10,470

Solution 1

1 is correct , but 2 assumption is true only if you don't close connection and you don't set max life time for the connection.

Usually you close the connection and then it return/released to the connection pool.

Also 100 max pool size is not needed, Although you didn't specify which connection pool you are using, you can read more about pooling setting in hikari pool size

Solution 2

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.

Share:
10,470
Apu
Author by

Apu

Updated on June 05, 2022

Comments

  • Apu
    Apu almost 2 years

    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?

  • Mark Rotteveel
    Mark Rotteveel over 5 years
    Why are you linking to Hikari documentation on a question that refers to an Oracle Pool (presumably Oracle UCP).
  • user7294900
    user7294900 over 5 years
    @MarkRotteveel Although OP didn't specify, I gave it for further reading on the subject on connection pool
  • Mark Rotteveel
    Mark Rotteveel over 5 years
    But details vary per connection pool, so that doesn't necessarily answer the question fully.
  • user7294900
    user7294900 over 5 years
    @MarkRotteveel also it include a "short video from the Oracle Real-World Performance group"