> You need to add your records in smaller batches and sleep just a
little between iterations.
>
> Your batches will have to be small enough to make the user response
time reasonable.
>
> You'll find that your loop of inserting records won't take long. It's
when you do the "COMMIT" that it lock
> Is it possible you have a busy-handler installed? Are you using SQLite
directly or via some wrapper API?
Yes and no. I set a busy handler of 1 minute, but it takes longer than
this and doesn't timeout, plus I tried without the busy timeout; made no
difference.
Thanks,
Nick.
___
On May 25, 2010, at 10:24 PM, Nick Shaw wrote:
> Hi all,
>
>
>
> I've got a database that is accessed by two processes on the same PC.
> When I add a large number of records to a table from one process (all
> records wrapped in a BEGIN DEFERRED / END so it's committed to disk
> all
> at once; a
> According to http://www.sqlite.org/lang_transaction.html, in deferred
> mode, sqlite creates a RESERVED lock on the DB when it starts a write
> operation, but this should allow other SHARE locks at the same time,
> implying other processes should still be able to query the database
> during the w
___
From: sqlite-users-boun...@sqlite.org on behalf of Nick Shaw
Sent: Tue 5/25/2010 10:24 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] File locking with BEGIN/END
Hi all,
I've got a database that is accessed by two processes on the same PC.
When I add a large number
Hi all,
I've got a database that is accessed by two processes on the same PC.
When I add a large number of records to a table from one process (all
records wrapped in a BEGIN DEFERRED / END so it's committed to disk all
at once; and we're talking about adding 500,000 recs to a DB containing
aro
6 matches
Mail list logo