in reply to Putting an SQLite DB file into memory

Does the Raspberry Pi have /tmp on a tmpfs file system? If so, just put your working DB there, and every so often (in a separate process) do:

sqlite3 /tmp/workingDB .dump | sqlite3 /actualfilesystem/newpermanentD +B

There's even no need to close your connection from perl.

Replies are listed 'Best First'.
Re^2: Putting an SQLite DB file into memory
by Linicks (Scribe) on Sep 26, 2016 at 16:11 UTC

    I run Slackware on my Pi's, and of course it supports tmpfs. I run one Pi with MJPEG-streamer and with the cam in 'burst' mode dumps the files to a tmpfs - all in memory and doesn't touch the SD Card. Works really well. Also been running over a year now with no issues. tmpfs is the way to go with this.

    Nick