Why python+sqlite3 is extremely slow?

前端 未结 1 1318
猫巷女王i
猫巷女王i 2021-02-20 17:12

I tried to process the same request to the same database using \"Python 2.7.4 + sqlite3\" and \"Firefox SQLite Manager 0.8.0\".

On the tiny database (8000 records) both

相关标签:
1条回答
  • 2021-02-20 17:24

    It seems, that the problem is related with the old version of sqlite that shipped with Python 2.7. Everything works fine in python 3.3.

    Thanks a lot to @CL for the great comment!

    In python 2.7

    >>> import sqlite3
    >>> sqlite3.sqlite_version
    '3.6.21'
    

    In python 3.3

    >>> import sqlite3
    >>> sqlite3.sqlite_version
    '3.7.12'
    
    0 讨论(0)
提交回复
热议问题