Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@caekislove The main problem with SQLite is 10 minute long queries that should take 0.01s. Re-running the exact same query again takes 0.01s. This is in a 40GB database. Then I found a 20 year old thread of people complaining about how SQLite relies on OS disk cache and it can do that sometimes.
My original idea was to prune the db so it's always small, keeping only the last 7 days of data. But the other problem with SQLite is that it destroys performance to delete things! So whenever you run that cron it freezes the whole application for all users.
It could probably have been improved by running a worker pool on top of it. But you would still get 10 minute queries in some threads, it just wouldn't block the others.