[sqlite] NOP INSERT still writes to the DB/journal

2016-02-09 Thread Patrick Donnelly
Hello, On Mon, Dec 7, 2015 at 5:05 PM, Patrick Donnelly wrote: > Update on this: > > On Mon, May 5, 2014 at 4:53 PM, Patrick Donnelly > wrote: >> Hi, >> >> I have an INSERT that looks like >> >> INSERT INTO T >> SELECT ... >> >&

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-08 Thread Patrick Donnelly
On Mon, Dec 7, 2015 at 11:51 PM, Simon Slavin wrote: > > On 8 Dec 2015, at 12:19am, Patrick Donnelly wrote: > >> There are still writes: > > Because you have not defined any transactions, each of your INSERT commands > it getting wrapped in its own transaction. A tr

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-07 Thread Patrick Donnelly
On Mon, Dec 7, 2015 at 5:31 PM, Igor Tandetnik wrote: > On 12/7/2015 5:05 PM, Patrick Donnelly wrote: >> >> No rows were inserted but there are several writes. This behavior >> seems to be caused by AUTOINCREMENT? > > > Could be creating sqlite_sequence table wh

[sqlite] NOP INSERT still writes to the DB/journal

2015-12-07 Thread Patrick Donnelly
Update on this: On Mon, May 5, 2014 at 4:53 PM, Patrick Donnelly wrote: > Hi, > > I have an INSERT that looks like > > INSERT INTO T > SELECT ... > > which I'm running numerous times a second that generally does nothing > because the SELECT returns no rows

[sqlite] misleading note in the documentation for WAL

2015-02-20 Thread Patrick Donnelly
a transaction before the next writer, then the log file will not be restarted? [I assume this is why SQLITE_CHECKPOINT_TRUNCATE was added?] [1] https://www.sqlite.org/c3ref/wal_checkpoint_v2.html [2] https://www.sqlite.org/wal.html -- Patrick Donnelly

[sqlite] Extremely long running END (EXCLUSIVE) TRANSACTION in WAL mode

2015-02-20 Thread Patrick Donnelly
automatic checkpoints are "passive" and so should not block the checkpointer? I don't see how the writer is being blocked for so long. Can anyone provide hints on how to further debug this? -- Patrick Donnelly

[sqlite] random row from group

2014-07-08 Thread Patrick Donnelly
n-standard solutions which aren't supported in sqlite. For example: select distinct on (id) id, attribute from like_this order by id, random() from http://stackoverflow.com/questions/16044828/select-random-row-for-each-group Any pointers would be appreciated! -- Patric

[sqlite] NOP INSERT still writes to the DB/journal

2014-05-05 Thread Patrick Donnelly
to eliminate the INSERT by using a SELECT first to check if there are no rows? Something like: CREATE TEMPORARY VIEW V AS SELECT ... SELECT COUNT(*) FROM V; /* If > 0 */ INSERT INTO T SELECT * FROM V; ? Thanks, -- Patrick Donnelly ___ sqlite-users mail