冶晶邓 <fatfat...@gmail.com> wrote:
> i'm using sqlite for a special mode:
> 1.one process write
> 2.other processes read
> now i hope all read will not be blocked by write, because i'm sure the
> writer won't update existing data, it only insert new data, so reader need
> not wait for it.

SQLite implements database-wide locking. It doesn't matter that you are writing 
one part of the database but reading another.

However, if you turn on WAL mode, then writers won't block readers. See

http://www.sqlite.org/wal.html

> follow the docs, i run the SQL "PRAGMA read_uncommitted = 1"

This only applies to the shared-cache mode, which in turn only works for 
multiple connections in the same process.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to