或者,有没有办法让sqlite SQL查询运行很长一段时间而不向数据库添加很多行?
这是一个测试,因此需要使用db驱动程序运行查询.
import sqlite3 import time con = sqlite3.connect(":memory:") con.create_function("sleep",1,time.sleep) c = con.cursor() c.execute("SELECT sleep(1.23)")