Are there any gotchas with using LiteFS and PRAGMA statements, particularly PRAGMA optimize? I guess I’m wondering what sorts of PRAGMA things LiteFS does itself. For PRAGMA journal_mode I’m assuming LiteFS automatically sets WAL and that doesn’t have to happen manually?
The SQLite docs recommend this usage–
Applications with long-lived database connections should run “PRAGMA optimize=0x10002” when the database connection first opens, then run “PRAGMA optimize” again at periodic intervals - perhaps once per day. All applications should run “PRAGMA optimize” after schema changes, especially CREATE INDEX.