Paul wrote: > I can check whether user_version matches magic number without transaction.
No. Executing "PRAGMA user_version" will start an automatic transaction if you didn't already start an explicit one. > Only when user_version does not match magic number I start transaction. This will never be faster than just starting a transaction explicitly and checking the version once. > The only thing I am worried about is whether > > pragma user_version=n; > > respects transactions and will be rolled back automatically in case > if something happens between that statement and COMMIT. Please have a look at this sentence, which you quoted in your mail: >> Please note that *all* accesses to the database file are done with >> transactions, including reading and writing the user_version value. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users