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.
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. 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? 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