Re:Why you should probably be using SQLite
by starcraft2wol on Friday October 27, 2023 @10:20AM
(#38038791)
I think the excitement about SQLite comes from LAMP stack fatigue
Every Wordpress site could have been built on sqlite just fine, with better security too. But beyond that, you probably want a real RDMS with auth and alter table.
[ Parent
| on HN ]
Re:Why you should probably be using SQLite
by zdragnar on Friday October 27, 2023 @10:25AM
(#38038874)
Back in the day, WordPress always ran on Apache with mod_php, correct? Wouldn't that be unsafe to use sqlite, since every request ran in a separate thread?
Re:Why you should probably be using SQLite
by graemep on Friday October 27, 2023 @11:40AM
(#38039973)
Separate prcoesses because php was not thread safe back then.
SQLite can handle multiple processes: https://www.sqlite.org/faq.html#q5
I am not sure it could back then
Re:Why you should probably be using SQLite
by zdragnar on Friday October 27, 2023 @01:30PM
(#38041380)
Writes and changes to the database itself are locked to a single process at a time, per your link.
If the load is very read heavy the write locks aren't an issue, but if you're tracking page views, comments or any other write-heavy feature, it'll be harder to get good performance.
Re:Why you should probably be using SQLite
by simonw on Friday October 27, 2023 @02:01PM
(#38041788)
Benchmark it with WAL mode turned on. You may be pleasantly surprised.
Re:Why you should probably be using SQLite
by simonw on Friday October 27, 2023 @11:42AM
(#38040000)
SQLite has a pretty interesting auth story using the auth callback hook.
Alter table is solvable too. I built tooling for that here: https://sqlite-utils.datasette.io/en/stable/cli.html#transfo...