Tore, A few things: 1. Remove the "or IGNORE" from your insert. 2. You only need to test for BUSY on the BEGIN IMMEDIATE command. 3. Transactions (begin immediate/commit) are beneficial for multi row operations. Like inserting a group of records then commit. Your not going to see any gain if you just have a singleton.
Some pseudo code: do begin immediate until ! busy || threshold exceeded (your call). INSERT (no need to test for busy you have the lock). if ( !SQLITE_OK || !SQLITE_DONE) ... call error handler. rollback. etc. COmmit. if ( !SQLITE_OK ) call error handler. rollback. etc. hth, Ken Tore Austraatt <[EMAIL PROTECTED]> wrote: Ken, sorry, it didn't make a difference, including _LOCKED in my test. None of the dropped records are involved in lock situations. an example... _exec("BEGIN IMMEDIATE...".... sqlite3_mprintf("INSERT OR IGNORE INTO ..."... _prepare if _OK _step if _DONE _exec("COMMIT"... else if _BUSY || LOCKED _exec ("ROLLBACK"... Thanks ! Tore. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users