推荐学习书目
› 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
kenneth
V2EX  ›  Python

如何批量更新一个10w条记录的数据库?求思路。。。

  •  
  •   kenneth · Dec 1, 2012 · 4791 views
    This topic created in 5045 days ago, the information mentioned may be changed or developed.
    测试数据10w条记录都通过抓取得来,能否通过Twisted长连接,监测有没有更新?
    通过gevent来异步更新数据?
    还是通过python-rq让队列来批量更新mysql中的数据?
    求思路?
    5 replies  •  1970-01-01 08:00:00 +08:00
    picasso250
        1
    picasso250  
       Dec 1, 2012
    将纪录划分成N份,摘要之?

    纯粹抛砖引玉。
    lonelybug
        2
    lonelybug  
       Dec 1, 2012
    分批量更新,每次1000条之类的。
    dreampuf
        3
    dreampuf  
       Dec 2, 2012
    10W这种量级,一条SQL,你问完了,也就跑完了。
    songpengf117
        4
    songpengf117  
       Dec 2, 2012
    重新抓取10W记录,要多长时间?
    picasso250
        5
    picasso250  
       Dec 3, 2012
    楼上问的问题貌似蛮重要的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2405 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:39 · PVG 19:39 · LAX 04:39 · JFK 07:39
    ♥ Do have faith in what you're doing.