On Sat, Mar 17, 2012 at 10:42 AM, Richard Hipp <d...@sqlite.org> wrote:

>  On Sat, Mar 17, 2012 at 1:08 AM, Arnav Aggarwal <
> arnav.aggarwal.2...@gmail.com> wrote:
>
> > On Sat, Mar 17, 2012 at 10:10 AM, Roger Binns <rog...@rogerbinns.com>
> > 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.
>

Richard, I don't have any choice of using a different filesystem.. And I am
sure that only one instance of application would be running and accessing
the database. I may add threads to the application in future, but only one
instance of application will run.

In such a scenario, can I safely delete the lock file and journal file (if
size 0) ?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to