Re: [sqlite] Will opening database in ReadOnly mode result in better query time
> Thanks. I understand this. But my file will be on a read-only medium. > So no other connection opening for writing is not possible. SQLite doesn't know if media is read-only, or is not accessible for writing for current user, or whatever else. So sorry, locks will persist and no speed-up for read-only files. Pavel On Wed, Feb 2, 2011 at 10:36 PM, Navaneeth.K.N wrote: >> >> You may have opened the file as read-only, but someone else may open the >> same file for writing. Thus, your connection still needs to maintain a >> shared lock, just like any other reader. > > Thanks. I understand this. But my file will be on a read-only medium. > So no other connection opening for writing is not possible. > > -- > -n > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Will opening database in ReadOnly mode result in better query time
Opening your database as read-only will not speed anything up. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Will opening database in ReadOnly mode result in better query time
> > You may have opened the file as read-only, but someone else may open the > same file for writing. Thus, your connection still needs to maintain a > shared lock, just like any other reader. Thanks. I understand this. But my file will be on a read-only medium. So no other connection opening for writing is not possible. -- -n ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Will opening database in ReadOnly mode result in better query time
On 2/2/2011 9:19 PM, Navaneeth.K.N wrote: > I have an application that uses SQLite just for querying. Application > will not write anything to the database. So I am wondering will I get > a better query time if the database is opened with flag > SQLITE_OPEN_READONLY? I am guessing on a read only database, SQLite > doesn't have to do any kind of locking which will lead to performance > improvement. You may have opened the file as read-only, but someone else may open the same file for writing. Thus, your connection still needs to maintain a shared lock, just like any other reader. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Will opening database in ReadOnly mode result in better query time
Hello, I have an application that uses SQLite just for querying. Application will not write anything to the database. So I am wondering will I get a better query time if the database is opened with flag SQLITE_OPEN_READONLY? I am guessing on a read only database, SQLite doesn't have to do any kind of locking which will lead to performance improvement. -- -n ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users