What really is connection pooling?

后端 未结 6 972
灰色年华
灰色年华 2021-02-01 18:49

I have heard the term connection pooling and looked for some references by googling it... But can\'t get the idea when to use it....

  • When should i consider usin

6条回答
  •  青春惊慌失措
    2021-02-01 19:10

    If we required to communicate with the database multiple times then it is not recommended to create a separate Connection Object every time, because creating and destroying connection object impacts performance.

    To overcome this problem we should use a connection pool.

    If we want to communicate with the database then we request a connection pool to provide a connection. Once we got the connection, by using it we can communicate with the database. After completing our work, we can return the connection object back to the pool instead of destroying it.

    The main advantage of connection pooling is to reuse the same connection object multiple times.

提交回复
热议问题