if we must use the Python shell, then there is no better solution than two-pass reading and writing. but starting with version 3.7.17, SQLite has the ability to directly access the contents of the disk using mapped I / O. sqlite mmap
if you want to use mmap, you must use the C interface, since it does not provide any wrapper.
and there is another hardware solution, a memory disk. Then you have a convenient file I / O and memory speed.
obgnaw Dec 11 '17 at 2:56 on 2017-12-11 02:56
source share