4 ms·
SQLite serializes writes for you, there’s no need to think about it apart from handling SQLITE_BUSY
by config_yml 3y ago
SQLite serializes writes for you, there’s no need to think about it apart from handling SQLITE_BUSY
- bawolff 3y agoOne thing that really confused me with sqlite is how read transactions that are upgraded to write transactions half way through tend to fail very easiltly under high write load and cannot be automatically restarted by sqlite. It all makes sense in their concurrency model but it was surprising to me. The tl;dr is if you know you are going to write data in a transaction but the first operation is a read,use begin immddiate, so you dont have to worry about having to restart things manually.