On Sat, Mar 17, 2012 at 1:08 AM, Arnav Aggarwal < [email protected]> wrote:
> On Sat, Mar 17, 2012 at 10:10 AM, Roger Binns <[email protected]> > wrote: > > > -----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. > > > Thanks Roger. I agree with what you said. > I am using "unix-dotfile" because that is the safest thing that works with > my filesystem. > If the default doesn't work on your filesystem (and unix-dotfile is not the default) then that is a pretty good indicator that you need to get a new filesystem. > For testing, I keep killing my process while it is doing operations on the > database. Sometimes, I find stale "xyy.lock" directory left behind due to > which my database open fails. Sometimes, I also see stale journal file. > My question is how to get rid of the stale lock directory? Is it safe to > delete the lock directory during application start up ? > What is to de done with the stale journal file ? Can I remove it during > application start up, if its size is 0 bytes ? > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

