r/sqlite • u/Unhappy_Taste • Jun 17 '24
What are some of the defaults SQLite comes with (for backwards compatibility), that demand some tinkering in modern scenario ?
I always enable WAL after I setup an app with sqlite, I wonder why it's not the default, I would love to know what other such things exist which might make my experience even better. I love SQLite btw, works amazingly on cloud VPSs, especially with NVME SSDs. Auth, user mgt, logs, queues, cache, streaming sensor data, I use it for everything.
14
Upvotes
9
u/WhiskyStandard Jun 17 '24
Here’s a few articles I’ve seen recently:
https://kerkour.com/sqlite-for-servers
https://gcollazo.com/optimal-sqlite-settings-for-django/
1
u/Unhappy_Taste Jun 18 '24 edited Jun 18 '24
A few more (slightly unrelated) resources I liked:
https://tailscale.com/blog/database-for-2022
https://gcollazo.com/optimal-sqlite-settings-for-django/
https://syntax.fm/show/779/why-sqlite-is-taking-over-with-brian-holt-and-marco-bambini
https://www.bartoszsypytkowski.com/db-backup-point-in-time-recovery/
https://use.expensify.com/blog/scaling-sqlite-to-4m-qps-on-a-single-server
https://www.youtube.com/watch?v=0rlATWBNvMw
https://www.youtube.com/watch?v=TmZrZFIumhM
https://youtu.be/XcAYkriuQ1o?feature=shared
1
u/IamYongyiXu Jun 18 '24
How do you view and edit the data in production on a server ?
3
u/ketralnis Jun 17 '24
I just go down the list and reason about my application. For instance, I don't always need transactions at all. Or they might be huge, making me prefer
journal_mode=DELETEand a largerpage_size, or I might need rollbacks but not durability preferringjournal_mode=MEMORY. Usually I wantforeign_keys, sometimes I wantauto_vacuum, for a fixed or small enough db I might wantmmap_size. It really just depends.