Daniel Polski wrote: > Can using "PRAGMA optimize" in one thread create a situation where > "BEGIN IMMEDIATE TRANSACTION" in another thread fails?
While the optimization is done, the database is locked, just as with any other transaction that does writes. So any other thread has to use a timeout. > Is there any risk of "optimization fighting" if several threads are > using the same database but with different work load? At the moment, it only runs ANALYZE, which (in theory) never hurts. The documentation says that in the future, it will "record usage and performance information from the current session in the database file so that it will be available to "optimize" pragmas run by future database connections." So it will not matter which connection runs the PRAGMA. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users