apsw is an alternative shell for sqlite, which allows you to backup the database to disk before the operation.
From docs :
### ### Backup to memory ### # We will copy the disk database into a memory database memcon=apsw.Connection(":memory:") # Copy into memory with memcon.backup("main", connection, "main") as backup: backup.step() # copy whole database in one go # There will be no disk accesses for this query for row in memcon.cursor().execute("select * from s"): pass
connection above is your db on disk.
Ryan Ginstrom Sep 29 '10 at 23:20 2010-09-29 23:20
source share