Re: [sqlite] PRAGMA optimize; == no busy handler?

2017-10-03 Thread Paul
From my personal experience, performance instability of SQLite queries (drastically jumping from milliseconds to seconds and back) that is fixable by running ANALYZE means that your queries are not optimal (some crucial indices are missing). The reason ANALYZE helps is because the info that

Re: [sqlite] PRAGMA optimize; == no busy handler?

2017-10-03 Thread Howard Kapustein
>Don't do that Mostly sure, but there's some cases SQLite will skip the busyhandler and immediately return, but they're not permanently-busy conditions. We have multiple threads across multiple processes using the database > why you’re doing "PRAGMA optimize" while other parts of your program

Re: [sqlite] PRAGMA optimize; == no busy handler?

2017-10-03 Thread Simon Slavin
On 4 Oct 2017, at 2:23am, Howard Kapustein wrote: > What do you think of an option to only analyze tables that have grown from 0 > records to >0 e.g. PRAGMA optimize(0x10002) so 2=ANALYZE if beneficial and > 0x1=change the criteria from "increased by 25

[sqlite] pragma integrity_check throwing exception

2017-10-03 Thread Roberts, Barry (FINTL)
Hi, Assume I have a database which is "malformed" due to rowid xxx missing from a table index. In the System.Data.SQLite.dll 1.0.80.0 C# driver the following code would return the reason, I would get a list of the rowid problems allowing me to log them. private static IEnumerable

Re: [sqlite] Tool for extracting deleted data from unvacuumed SQLite files

2017-10-03 Thread LincolnBurrows
If you are not a developer you can avoid having the same problem again using Sqlite Recovery tool and recover deleted records from Sqlite database . It adds single-master replication to SQLite. -- Sent from:

Re: [sqlite] Tool for extracting deleted data from unvacuumed SQLite files

2017-10-03 Thread LincolnBurrows
If you are not a developer you can avoid having the same problem again using Sqlite Recovery tool and recover deleted records from Sqlite database . It adds single-master replication to SQLite. -- Sent from:

[sqlite] PRAGMA optimize; == no busy handler?

2017-10-03 Thread Howard Kapustein
Using SQLite 3.20.1 I notice a flood of log events sometimes when I call PRAGMA optimize; Warning 0x5: statement aborts at 1: [PRAGMA optimize;] database is locked And a few times Warning 0x5: statement aborts at 2: [PRAGMA optimize;] database is locked And even once Warning 0x5: statement

Re: [sqlite] Ordering a GROUP BY, or other concatenating tricks?

2017-10-03 Thread Simon Slavin
On 3 Oct 2017, at 11:13pm, Doug Nebeker wrote: > How can I select a document and get the complete sorted text back in a single > row (so I can do a JOIN on a different table with additional information)? There is a way which will probably work but the documentation

[sqlite] Ordering a GROUP BY, or other concatenating tricks?

2017-10-03 Thread Doug Nebeker
Imagine a table that holds individual lines of text documents: CREATE TABLE DocLines ( DocID INTEGER, LineIndex INTEGER, LineText TEXT ); INSERT INTO DocLines (DocID, LineIndex, LineText) VALUES (1, 1, 'Mary had a little lamb'); INSERT INTO DocLines (DocID, LineIndex,

Re: [sqlite] PRAGMA optimize; == no busy handler?

2017-10-03 Thread Simon Slavin
On 4 Oct 2017, at 12:54am, Howard Kapustein wrote: > We use the default busy-handler w/timeout=250ms and call sqlite_exec("PRAGMA > optimize;") in a loop until success or non-busy/locked error or some ungodly > amount of time elapses (~5min). The logs indicate