Skip to content

Execution become very slow when writing concurrently. #49

Answered by zombiezen
hxhxhx88 asked this question in Q&A
Discussion options

You must be logged in to vote

What you're seeing is more an artifact of your microbenchmark, not entirely representative of a real-world workload. If you're looking for very write-contended workloads, you may want to use PostgreSQL or another RDBMS. IME though, for small-to-mid-scale workloads, SQLite works just fine with vertical scaling. See Appropriate Uses for SQLite for some rough guidelines.

Longer Explanation: The best that SQLite can do is with Write-Ahead Logging, which is enabled by default in this package. This permits reading and writing to happen concurrently, but SQLite intentionally only allows one database writer at a time. When a writer encounters a locked database, by default it will back off to avoi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hxhxhx88
Comment options

Answer selected by hxhxhx88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants