-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/03/12 20:34, Arnav Aggarwal wrote:
> I want to link sqlite code with my application which is single
> threaded. So, I keep SQLITE_THREADSAFE=0.

I would recommend leaving it at the default.  Any performance penalty is
unlikely to even be measurable.  Additionally as your app grows, other
programmers work on it, time passes, new libraries are added etc there is
always the possibility of someone adding helper threads or some other form
of concurrency.  The default will at least ensure you won't silently trash
memory.

> Is it safe to pass "unix-nolock" as the application is single threaded
> ?

Use null/default.  Again there is no need to try to optimise.

> I mean is there any need to create a "lock" file if only single thread
> is using the database ?

Until one day another developer or a system administrator runs the SQLite
shell and trashes the database inadvertently (which you may not discover
for a while).

There really isn't any point trying to micro-optimise this stuff.  It
won't make a performance or memory difference, and it requires perfection
from developers, system administrators and future versions of yourself.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk9kFa0ACgkQmOOfHg372QRJsACgmaLWIhK2uAboJEYgCRqcHwqk
jVIAoImknImrRM6GqXra3eEU66tqkWHw
=vk6g
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to