How can I speed up fetching the results after running an sqlite query?

牧云@^-^@ 提交于 2019-11-29 11:47:27

From reading this question, it sounds like you could benefit from using the APSW sqlite module. Somehow you may be victim of your sqlite module causing your query to be executed in some less performant manner.

I was curious so I tried using apsw myself. It wasn't too complicated. Why don't you give it a try?

To install it I had to:

  1. Extract the latest version.
  2. Have the installation package fetch the latest sqlite amalgamation.

    python setup.py fetch --sqlite
    
  3. Build and install.

    sudo python setup.py install
    
  4. Use it in place of the other sqlite module.

    import apsw
    <...>
    conn = apsw.Connection('foo.db')
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!