I’m working on a new article to summarize what I think you need to know before choosing SQLite to back your Rails app.
Joy of Rails runs entirely on SQLite. I‘m really happy with my choice but that doesn’t mean it‘s a good fit for everyone.
Are you considering SQLite? What do you want to know?
Joy of Rails runs entirely on SQLite. I‘m really happy with my choice but that doesn’t mean it‘s a good fit for everyone.
Are you considering SQLite? What do you want to know?
Comments
I love the simplicity of SQLite, but I have no idea what I would do if I hit a bottleneck.
"As long as you don't expect to need tens of thousands of small writes per second, thousands of large writes, or long-lived write transactions, it's highly likely that SQLite will support your usecase."
https://blog.wesleyac.com/posts/consider-sqlite
Great article with details:
https://blog.wesleyac.com/posts/consider-sqlite
https://litestream.io/
Though there are a few Rails-specific features, I expect the core functionality would be compatible with Sinatra, Hanami, Roda, etc.
https://fractaledmind.github.io/2023/12/12/sqlite-on-rails-litestream-ruby/
I also find it fascinating that the main sqlite production story is essentially scale it vertically forever. So what is hypothetical ceiling on that.
https://blog.wesleyac.com/posts/consider-sqlite
I know Postgres and traditional DBs and know how, why, and when they need to scale. So there’s no real gain for me to think about SQLite.
The other thing I miss with SQLite compared to PG is the range of functions and data types available. If you plan to write complicated queries then I would pick PG.
Here’s a great article that gets into specifics about SQLite‘s non-concurrent write limitations. SQLite doesn’t really compare with PG on this front but the takeaway is perf is better than you might expect!
https://blog.wesleyac.com/posts/consider-sqlite