python-MySQL学习笔记-第六章-Connector/Python连接池(Connection Pooling)
来源:互联网 发布:网络电影商业计划书 编辑:程序博客网 时间:2024/06/07 18:56
MySQL Connector/Python 1.1.1 and up supports simple connection pooling that has these characteristics
自1.1.1版本后就支持简单的连接池了,下面是它所具有的特性
The mysql.connector.poolingmodule implements pooling.
mysql.connector.pooling 模块继承了pooling模块
A pool opens a number of connections and handles thread safety when providing connections to
requesters.
当为请求者提供连接的时候,连接池会打开大量的连接并且会处理线程安全
The size of a connection pool is configurable at pool creation time. It cannot be resized thereafter.
连接池的大小在连接池创建的时候是可以指明的,这点跟python的进程池操作一致,而且在创建以后大小不能再被更改
A connection pool can be named at pool creation time. If no name is given, one is generated using the connection parameters.
在连接池创建的时候可以给其命名,否则,它会用连接参数生成一个名字
The connection pool name can be retrieved from the connection pool or connections obtained from it.
连接池的名字可以从连接池中取回或者从和它建立的连接那里得到
It is possible to have multiple connection pools. This enables applications to support pools of connections to different MySQL servers, for example.
你可以应用多个连接池,比如:这可以使应用可以支持不同的MySQL服务器的连接池
For each connection request, the pool provides the next available connection. No round-robin or other scheduling algorithm is used. If a pool is exhausted, aPoolErroris raised.
对每一个不同的连接请求,连接池都提供了下一个可用的连接,并没有应用轮询或者调度算法,如果一个进程池连接耗尽了,它会报出一个PoolError异常
It is possible to reconfigure the connection parameters used by a pool. These apply to connections obtained from the pool thereafter. Reconfiguring individual connections obtained from the pool by calling the connectionconfig()method is not supported.
Applications that can benefit from connection-pooling capability include: 你的应用可以从连接池的包含的方法中受益
0 0- python-MySQL学习笔记-第六章-Connector/Python连接池(Connection Pooling)
- python-MySQL学习笔记-第三章-利用Connector/Python来插入数据
- python-MySQL学习笔记-第四章-利用Connector/Python来查询数据
- python-MySQL学习笔记-第五章-利用Connector/Python来修改数据库
- Python学习总结笔记(9)-- MySQL数据库操作之mysql-connector
- python学习笔记 第六章
- DB2学习笔记 --- python连接db2的connection方法参数
- python访问mysql 连接mysql - 使用mysql connector
- MySQL Connector/Python
- mysql-connector-python安装
- Python:安装MYSQL Connector
- 【python】mysql connector
- oracle database resident connection pooling(驻留连接池)
- python安装mysql-connector-python
- MySQL-Python 学习(二)-连接 MySQL
- 连接池的概念(connection pooling)
- J2EE Database Connection Pooling -连接池
- python学习(第六章)
- 查验身份证(15)
- sendmail邮件无法发出
- 字符串最后一个单词的长度之机试
- Jave EE Servlet 访问 MySQL 数据库
- 数据库建模
- python-MySQL学习笔记-第六章-Connector/Python连接池(Connection Pooling)
- 设计模式(4)之单例模式
- java BIO NIO AIO 理论篇
- activity或者window:addview
- 元胞自动机
- Latent Dirichlet Allocation
- c++中new和delete的使用方法
- 修改myeclipse 自动提示只有.abc
- 安卓eclipse与genymotion模拟器关联的插件解决办法
原创粉丝点击热门IT博客热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 龙珠改 第二季 日语 科目二改自动挡会很吃亏吗 改签可以改第二天的吗 二楼改独立下水多少钱 二年级被字句改把字句大全 二楼改下水道多少钱 二居改三居 西安地铁五号线二期线路改了 无座票上车后可以改二等座 改写人生 改写 暮江吟改写 示儿改写 word改写 改写暮江吟 白鹭改写说明文 五年级白鹭改写说明文 小镇绿事改写 杨永泰不死改写中国历史 改写天净沙秋思 答谢中书书改写散文 天净沙秋思改写散文 天净沙秋思改写 word改写切换 答谢中书书改写 人生改写系统 改写记承天寺夜游 改写卖火柴的小女孩结局 记承天寺夜游改写 五年级白鹭2至5段改写说明文 消防改制 消防改制吧 王莽改制 托古改制 改制沥青 医院改制 改制企业 徐工改制 改制 事业单位改制 国有企业改制职工安置方案