Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You cannot have multiple writers to a SQLite database. Only a single file descriptor may be open with 'write' access. As long as you can get the performance you need out of a single writer, then you're good!


Clarification: You can have multiple connections (aka file descriptors) open on the same database file for writing at the same time. But only one can be actively writing at a time. SQLite uses file locking to serialize writes. Multiple writers can exist concurrently, they merely have to take turns writing.


WAL allows multiple readers and writers:

https://www.sqlite.org/isolation.html


Yes, but in some cases it could be faster to work in sole- writer mode. It is kind of cooperative multitasking demonstrating by Node.js.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: