Andrii Motsok <andrii.mot...@tomtom.com> wrote: > Hi, > > > My understanding is that any reading from database automatically > starts read transaction. The question: why does sqlite need to do it on > read-only database? > > > Regards, > > Andrii
You may open a database as read-only, but another process can open it as read-write. So SQLite needs to check the lock even when the DB is opened as read-only. Now if the database is on a read-only file system, it is possible to tell SQLite by opening with file:foo.sqlite?immutable=1 (see https://www.sqlite.org/uri.html) and that can save some time. But make sure to read the caveats at above URL. Regards Dominique _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users