推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
wjx1993
V2EX  ›  Python

PooledDB 数据库连接池怎么关闭的?

  •  
  •   wjx1993 · Jun 26, 2018 · 3447 views
    This topic created in 2883 days ago, the information mentioned may be changed or developed.

    close()关不掉

    4 replies    2018-06-26 11:58:39 +08:00
    wibile
        1
    wibile  
       Jun 26, 2018
    close 只是关掉一个 connection 吧,连接池还在。建议用 sqlalchemy 的 pool,测试过,比 poolDB 性能更好并发更高
    wjx1993
        2
    wjx1993  
    OP
       Jun 26, 2018
    sqlalchemy 的 pool 怎么用的?可以发个 demo 吗
    whx20202
        3
    whx20202  
       Jun 26, 2018
    @wjx1993 #2 你自己去找个文档看看吧 sqlalchemy 的 pool 基本上什么都不做就行了,只需要很简单的配置
    wzw
        4
    wzw  
       Jun 26, 2018 via iPhone
    Pool 还需要管吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1722 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 16:26 · PVG 00:26 · LAX 09:26 · JFK 12:26
    ♥ Do have faith in what you're doing.