Hi Richard On Fri, Dec 7, 2012 at 2:08 AM, Richard Hipp <d...@sqlite.org> wrote: > If that does cure your latencies, it also adds another problem, in that it > does nothing to prevent two or more processes, or even two threads within > the same process, from trying to use the database at the same time and > tripping over one another. So this solution will only work if you can > absolutely guarantee that nobody will ever fire up an "sqlite3" shell on > your database file at the same time you application is using it.
First, thank you so much for having the patience to help me out, really appreciate it. I tried to see if unix-none works from the shell: ----- sqlite3 file:/tmp/test.db?vfs=unix-none SQLite version 3.7.10 2012-01-16 13:28:40 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables Error: unable to open database file ----- I can't seem to get this to work, but I know URI name format is working because sqlite3 file:/tmp/test.db?vfs=unix works fine. I had another idea. Would setting "PRAGMA locking_mode=EXCLUSIVE;" have the same effect? Ie it only locks once when opening the DB, and never releases it? I tried this, but the latency is still there. I have gone another step further and straced it: ------------------- 19547 22:04:13.331096 _llseek(79, 1050632, [1050632], SEEK_SET) = 0 <0.000016> <ext3 commit happens here> 19547 22:04:13.545595 write(79, "\0\0\0\4\0\0\r\222\313\370\227\2001\342\366\304p\5\254\250W}<\372", 24) = 24 <0.000243> 19547 22:04:13.546570 _llseek(79, 1050656, <unfinished ...> 19547 22:04:13.547100 <... _llseek resumed> [1050656], SEEK_SET) = 0 <0.000502> 19547 22:04:13.548011 write(79, "\r\0\0\0\1\0173\0\0173\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096 <unfinished ...> 19547 22:04:13.548368 <... write resumed> ) = 4096 <0.000293> ------------------- We can see the times taken to do the syscalls are fast, so what is causing the delay between the seek and write? I had a look at the code, and found the method seekAndWrite(), which looks pretty straight forward. The only time it could be slow is when osWrite() return -1. Any ideas? Please advise if I should still try to get vfs=unix-none to work. Regards Keith _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users