Some of these feel like tradeoffs and setting them blindly without understanding the downsides seems incorrect.
Some of these feel like tradeoffs and setting them blindly without understanding the downsides seems incorrect.
SQLite is an amazingly widely used piece of software. It's impossible for one set of defaults to be perfect for all use cases.
For example, OP suggests setting the `synchronous` pragma to `NORMAL`. This can be a performance gain, but it also comes at the cost of slightly decreased durability. So for that setting, I’d feel that `FULL` (the default) makes more sense as factory default for a database.
These may be useful settings for a certain kind of application under a certain workload. As usual, monitor your application and decide what is suitable for your situation. It is limiting to think in a binary way of something being sensible or not.
[0] Like "Best Practices". Any else you can think of?
If you are going to need to optimise with performance metrics anyway, then why not stick to just the official defaults (unless the official defaults are non-functional, is that the case?)
I think anyone who is reading a blog post on “better defaults” is front loading some of the optimisation, so you could let them make a principled choice straight away for marginal extra cost.
It's not good in the case where multiple machines are sharing the same database. Like say if you had a shared settings file which allowed multiple VMs to be set in one place.
Obviously the same-machine situation is the most common. But you asked for a reason for when wal is not appropriate.
Well, why don't you do the research and tell us?
In my 10-15 years of dealing with official defaults of many programs is that they do work, but in 90% of cases they are overly-conservative.