Thanks Donald. Inline....

On 7/19/05, Griggs, Donald <[EMAIL PROTECTED]> wrote:
> I'm no expert, but I hope the following are accurate.
> 
> Regarding: 1) Should I use a transaction even for a single record?
>   You already are, since your inserts automatically become one-line
> transactions.
OK then I guess I need to batch them to improve performance. Temp
tables best way to go?
 
> 
> Re: 2) I open the DB, insert the record and close the DB for every record
> inserted. What if the process crashed before I closed the DB. Would the DB
> get locked? If so how do I unlock it?
> 
>     You only need worry about crashing *during* the insert, and even then
> the sqlite journal capability should do glorious things when you next open
> the database, restoring it to a consistent state.
> 
> If you left the database open during your logging sessions then it should be
> much more efficient -- at least in terms of disk activity and CPU time.

My concern here is that leaving the DB open for long leaves the DB
file susceptible to corruption during power failures, spikes etc.
Opening, writing and closing reduces this window.

Could you clarify how is the DB unlocked if my app that obtained  a
handle on it got killed before releasing the locked?


> 
> Re:  3) Six million and (not) counting:
>    I don't really know, but are you perhaps on a FAT filesystem with a
> 2GByte filesize limit?
No. Its an ext2 :-(
When the DB got locked the partition usage was just 6%!


> 
> 
> Donald Griggs
> 
> Opinions are not necessarily those of Misys Healthcare Systems nor its board
> of directors.
> 
> 
> 
> -----Original Message-----
> From: R S [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 19, 2005 2:23 PM
> To: sqlite-users@sqlite.org
>

Reply via email to