2

I'm using sqlite3 for a logging function. If I don't need any concurrency (there's only one writer all the time), but I need fast inserts what journal mode should I choose?

J. Doe
  • 51
  • 3
  • If there's only one connection ever trying to write, and nothing trying to read from the database, probably TRUNCATE if it's doing a lot of writing. If on a regular basis other connections are trying to read at the same time the writer is doing its thing, WAL. – Shawn Sep 20 '18 at 20:11

1 Answers1

0

WAL mode needs less synchronization, so writes are faster, except when the database decides to do a checkpoint.

CL.
  • 173,858
  • 17
  • 217
  • 259