▲ | andersmurphy 6 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
If you're running on a single machine then you'll get way more performance with something like sqlite (instead of postgres/MySQL) which also makes managing the database quite trivial. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | immibis 6 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
SQLite has serious concurrency concerns which have to be evaluated. You should consider running postgres or mysql/mariadb even if it's on the same server. SQLite uses one reader/writer lock over the whole database. When any thread is writing the database, no other thread is reading it. If one thread is waiting to write, new reads can't begin. Additionally, every read transaction starts by checking if the database has changed since last time, and then re-loading a bunch of caches. This is suitable for SQLite's intended use case. It's most likely not suitable for a server with 256 hardware threads and a 50Gbps network card. You need proper transaction and concurrency control for heavy workloads. Additionally, SQLite lacks a bunch of integrity checks, like data types and various kinds of constraints. And things like materialised views, etc. SQLite is lite. Use it for lite things, not hevy things. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | rixed 6 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
If you have a single request at a time and need little integrity checks. |