What really is connection pooling?

后端 未结 6 915
灰色年华
灰色年华 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:23

    The idea is that you do not open and close a single connection to your database, instead you create a "pool" of open connections and then reuse them. Once a single thread or procedure is done, it puts the connection back into the pool and, so that it is available to other threads. The idea behind it is that typically you don't have more than some 50 parallel connections and that opening a connection is time- and resource- consuming.

提交回复
热议问题