I've been searching through the archive without much luck on this topic, so I'll ask my question. If this has been answered somewhere else please point me to that.
I have a single process that independently opens and uses multiple Sqlite databases, each with its own connection. The data in each database is entirely independent of the data in any other database, so I never use the ATTACH capability, just open each db separately. This all works correctly, but I am having some performance issues. It appears that it might be the case that a write on the connection of one database blocks any activity on the connection of the other databases. Some things that led me to this conclusion are tests that show with only a single db I can process some data in N seconds, but when I have two threads each talking to their own db, the time jumps to around 2*N seconds, while if I run two test processes each with its own db the time is only a little over N. The host I am using has lots of spare CPU cycles during these tests, and I have used normal disks, SSDs, and ram disks, all with synchronous=OFF. I have tried THREAD_SAFE=1 and 2, the default journal mode, the WAL journal mode, and BEGIN DEFERRED and BEGIN EXCLUSIVE, on Linux and Windows. Does this make sense? Does Sqlite let two connections to different databases impact each other? Of course it could be that I am doing something dumb elsewhere, but I have literally spent many days debugging and profiling this to no avail. Any suggestions or other configurations I might try? Any help is appreciated! Bob _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users