什么是真正的连接池? [英] What really is connection pooling?

查看:183
本文介绍了什么是真正的连接池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说过这个词连接池,并期待通过谷歌搜索其一定的参考...但不能得到的想法时使用它....

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 using connection pooling?

有什么优点和
disadvantagesof连接池?

What are the advantages and disadvantagesof connection pooling?

任何建议....

推荐答案

我们的想法是,你不打开和关闭你的数据库的连接,而不是创建一个打开的连接池,然后重新使用它们。一旦单个线程或过程完成后,它把连接回池中和,因此,它是提供给其他线程。其背后的想法是,通常你没有比某些50并行连接并打开一个连接时间和资源 - 消费更多。

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.

这篇关于什么是真正的连接池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆