Re: [sqlite] Will a read-only transaction cause writes to the WAL?
Hi, thanks for the clarification. I may need to add a custom implementation of the VFS or a patch for the -shm files to be held on memory-disk then. Regarding the question, why I want to wrap reads in a transaction is, because I don't know if there'll be a write as part of the transaction in before. That partly depends on results returned from the query. Thanks for your answers! Best regards, Martin On Thu, Sep 16, 2010 at 9:14 PM, Richard Hipp wrote: > Reads to not write to the WAL. But they might write to the shared-memory. > > On Thu, Sep 16, 2010 at 1:16 PM, Martin C. wrote: > >> Hi, >> >> I am using SQLite on a NAND based embedded system, and to ensure the >> lifetime of the NAND I need to optimize writes to the NAND. >> >> Can you tell me, if a read-only transaction, by which I mean >> BEGIN TRANSACTION >> SELECT * from SomeTable; >> COMMIT >> will cause any writes to the WAL? >> >> What about the -shm file, is it likely that the transaction will cause >> a write to the NAND in this case? >> >> Is there any statistics about actual writes I can query to analyze >> write-behavior of my software? >> >> Thanks in advance! >> >> Best regards, >> Martin >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > > > -- > D. Richard Hipp > d...@sqlite.org > ___ > 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 a read-only transaction cause writes to the WAL?
Reads to not write to the WAL. But they might write to the shared-memory. On Thu, Sep 16, 2010 at 1:16 PM, Martin C. wrote: > Hi, > > I am using SQLite on a NAND based embedded system, and to ensure the > lifetime of the NAND I need to optimize writes to the NAND. > > Can you tell me, if a read-only transaction, by which I mean > BEGIN TRANSACTION > SELECT * from SomeTable; > COMMIT > will cause any writes to the WAL? > > What about the -shm file, is it likely that the transaction will cause > a write to the NAND in this case? > > Is there any statistics about actual writes I can query to analyze > write-behavior of my software? > > Thanks in advance! > > Best regards, > Martin > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Will a read-only transaction cause writes to the WAL?
Just curious why you wrap your SELECT statement into a 'TRANSACTION' ... -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Martin C. Sent: quinta-feira, 16 de setembro de 2010 14:16 To: sqlite-users@sqlite.org Subject: [sqlite] Will a read-only transaction cause writes to the WAL? Hi, I am using SQLite on a NAND based embedded system, and to ensure the lifetime of the NAND I need to optimize writes to the NAND. Can you tell me, if a read-only transaction, by which I mean BEGIN TRANSACTION SELECT * from SomeTable; COMMIT will cause any writes to the WAL? What about the -shm file, is it likely that the transaction will cause a write to the NAND in this case? Is there any statistics about actual writes I can query to analyze write-behavior of my software? Thanks in advance! Best regards, Martin ___ 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
[sqlite] Will a read-only transaction cause writes to the WAL?
Hi, I am using SQLite on a NAND based embedded system, and to ensure the lifetime of the NAND I need to optimize writes to the NAND. Can you tell me, if a read-only transaction, by which I mean BEGIN TRANSACTION SELECT * from SomeTable; COMMIT will cause any writes to the WAL? What about the -shm file, is it likely that the transaction will cause a write to the NAND in this case? Is there any statistics about actual writes I can query to analyze write-behavior of my software? Thanks in advance! Best regards, Martin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users