[sqlite] Speed, Locks and Stability

2006-04-05 Thread Deepak Kaul
Please rank the following scenarios considering speed, locks and stability. I'm using sqlite in a C++ environment and running in a single process and single threaded environment where SQL_BUSY should occur minimally. 1. Calling sqlite_exec within my C++ program 2. Calling sqlite_prepare, sq

[sqlite] Simple Addition Question

2006-03-17 Thread Deepak Kaul
I have an addition question. Is is possible to increment a value in an update statement? If so how would the sql statement be written? For example Table addition with the following columns unique_id, count I want something like the following UPDATE addition SET count = count + 1 WHERE unique_

Re: [sqlite] Multithread access to DB

2006-03-13 Thread Deepak Kaul
I had major problems with multithreaded access to a sqlite database file on an NFS mount. While not exactly your scenerio there might be some similarities. I had to come up with a crazy scheme to allow only one thread to access the sqlite database at a time. See below. I came up with a sch

Re: [sqlite] Using SQLite on networked drive

2006-03-03 Thread Deepak Kaul
I was tasked to use sqlite on a NFS mount on MacOSX 10.4. I had numerous problems with it because MacOSX does not implement locks properly. It would run for about 15 minutes or so and then I would start receiving Database Malformed errors. I had to come up with a different solution. I came

Re: [sqlite] Sqlite on MacOSX Network File System

2006-02-03 Thread Deepak Kaul
Can you explain the you mean by "I don't know if I would ever trust NFS." I'm not that familiar with its shortcomings. Do you have any other suggesting other than NFS? Is AFP any better? Thanks for you response. Will Leshner wrote: On Feb 3, 2006, at 6:40 AM, Deepak

[sqlite] Sqlite on MacOSX Network File System

2006-02-03 Thread Deepak Kaul
At http://www.sqlite.org/lockingv3.html in section 6.0 How To Corrupt Your Database Files it states the following... "POSIX advisory locking is known to be buggy or even unimplemented on many NFS implementations (including recent versions of Mac OS X) and that there are reports of locking prob

[sqlite] Multithreaded transactions

2006-01-27 Thread Deepak Kaul
I'm new to sqlite. I'm trying to use sqlite 3.2.8 in a multithreaded environment on MacOSX 10.4.4. I compiled it with threading enabled and I also get the database handle in each thread (I don't open it in the main thread and pass the handle around). The problem I'm having is when I try and use t