Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
On 8/30/19 3:34 AM, Keith Medcalf wrote: > Fascinating again, because the code is identical. The p1 difference in the > OpenWrite/IdxInsert/IdxDelete opcodes is just the "file handle" that happens > to be being used and doesn't have any real significance (at least I don't > think it does). The

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Keith Medcalf
Fascinating again, because the code is identical. The p1 difference in the OpenWrite/IdxInsert/IdxDelete opcodes is just the "file handle" that happens to be being used and doesn't have any real significance (at least I don't think it does). The p3 in the Transaction opcode is merely the sche

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
On 8/29/19 9:19 PM, Keith Medcalf wrote: > Fascinating ... because the optimal query plan would be to do a table scan of > tbl1 and then dip into tbl2 for each row to get the update value. The only > meaningful index then would be on tbl2(int) (that is idx3) since an index > will be unhelpful f

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
On 8/29/19 9:35 PM, Simon Slavin wrote: > On 29 Aug 2019, at 8:12pm, dirdi wrote: > >> The only difference between both runs: > > Well, that's nothing. I see no reason for the massive change in timing from > what you posted. But someone else might. Well the quoted line was shifted to output'

Re: [sqlite] SQLITE_BUSY, database is locked in "PRAGMA journal_mode"

2019-08-29 Thread test user
Just some more details to clarify the issue: If I do a `BEGIN IMMEDIATE` on one connection, and then a `PRGAMA journal_mode` on another, BUSY is not returned (as expected). But if I have around 7 connections contending for a write lock via `BEGIN IMMEDIATE`, and a different connection runs `PRGAM

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Simon Slavin
On 29 Aug 2019, at 8:12pm, dirdi wrote: > The only difference between both runs: Well, that's nothing. I see no reason for the massive change in timing from what you posted. But someone else might. ___ sqlite-users mailing list sqlite-users@mailingl

Re: [sqlite] What is the zlib compression level used by sqlar?

2019-08-29 Thread Richard Hipp
On 8/29/19, Peng Yu wrote: > It is not clear what level of zlib compression is used in sqlar. Does > anybody know? > > https://sqlite.org/sqlar/doc/trunk/README.md > > Is the following python code guarantee to generate a file that conform > to the sqlar format standard? (Note that I deliberately s

[sqlite] What is the zlib compression level used by sqlar?

2019-08-29 Thread Peng Yu
It is not clear what level of zlib compression is used in sqlar. Does anybody know? https://sqlite.org/sqlar/doc/trunk/README.md Is the following python code guarantee to generate a file that conform to the sqlar format standard? (Note that I deliberately set the timestamp and permission to zero

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Keith Medcalf
Fascinating ... because the optimal query plan would be to do a table scan of tbl1 and then dip into tbl2 for each row to get the update value. The only meaningful index then would be on tbl2(int) (that is idx3) since an index will be unhelpful for the LIKE constraint. Is the generated code d

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
On 8/29/19 6:00 PM, Simon Slavin wrote: > Just in case, please run an integrity-check on the database as it is before > you delete/rebuild the index. The python script creates the DB from scratch every time. However ... > PRAGMA integrity_check; ... returned ... > ok > You might be able to le

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Richard Damon
On 8/29/19 10:56 AM, dirdi wrote: > On 8/29/19 6:10 PM, Keith Medcalf wrote: >> Do you have sqlite_stat1 or sqlite_stat4 tables present (that is, have you >> ever run analyze)? > No. > >> If the sqlite_stat1 or sqlite_stat4 tables are present, then if you run >> ANALYZE; rather than reindexing

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
On 8/29/19 6:10 PM, Keith Medcalf wrote: > Do you have sqlite_stat1 or sqlite_stat4 tables present (that is, have you > ever run analyze)? No. > If the sqlite_stat1 or sqlite_stat4 tables are present, then if you run > ANALYZE; rather than reindexing or dropping/recreating the index, what is

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Keith Medcalf
Do you have sqlite_stat1 or sqlite_stat4 tables present (that is, have you ever run analyze)? Neither running a REINDEX nor a VACUUM will modify the statistics, however, dropping the index will delete the index statistics for the index (and re-creating the index will not re-create the statis

Re: [sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread Simon Slavin
On 29 Aug 2019, at 3:09pm, dirdi wrote: > Does one have an explanation for this behavior? > Is it expected that the REINDEX command produces other results than > "manually" recreation of an index? > If yes, under which circumstances does this happen? > And is there some way to measure the "qual

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Free Ekanayaka
Hi Dominique, Dominique Devienne writes: > On Thu, Aug 29, 2019 at 2:35 PM Jose Isaias Cabrera > wrote: > >> Free Ekanayaka, on Thursday, August 29, 2019 06:40 AM, wrote... >> > See https://dqlite.io for more details. >> >> Can dsqlite be installed on Windows? I went to the site, read the >> R

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Free Ekanayaka
Hello Jose, Jose Isaias Cabrera writes: > Free Ekanayaka, on Thursday, August 29, 2019 06:40 AM, wrote... >> >> Hi, >> >> following up from my previous post back in 2017 [0], I'd like to >> announce version 1.0.0 of dqlite, a C library that brings data >> replication and high-availability to SQL

[sqlite] Unexpected REINDEX behavior.

2019-08-29 Thread dirdi
Hi there, I noticed some - at least for me - unexpected behavior of the REINDEX command: I have a DB with 7 tables, 11 indexes and a size of about 140MiB. The DB is generated by a python script parsing an XML file. Entries are added to the tables in arbitrary order. After the tables have been cre

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Dominique Devienne
On Thu, Aug 29, 2019 at 2:35 PM Jose Isaias Cabrera wrote: > Free Ekanayaka, on Thursday, August 29, 2019 06:40 AM, wrote... > > See https://dqlite.io for more details. > > Can dsqlite be installed on Windows? I went to the site, read the > README.md file, and could not find any reference of it.

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Jose Isaias Cabrera
Free Ekanayaka, on Thursday, August 29, 2019 06:40 AM, wrote... > > Hi, > > following up from my previous post back in 2017 [0], I'd like to > announce version 1.0.0 of dqlite, a C library that brings data > replication and high-availability to SQLite, using the Raft consensus > algorithm. > > The

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Free Ekanayaka
Hello, I updated the FAQ [0] with your two questions. Free [0] https://github.com/canonical/dqlite/blob/master/doc/faq.md#why-c test user writes: > Hey Free, > > Looks like an interesting project. > > Is there a blog or docs about the reasons for the move from Go to C? > > Also what types of

Re: [sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread test user
Hey Free, Looks like an interesting project. Is there a blog or docs about the reasons for the move from Go to C? Also what types of systems would utilise dqlite? Are there current users? Thanks On Thu, 29 Aug 2019 at 11:41, Free Ekanayaka wrote: > Hi, > > following up from my previous post

[sqlite] dqlite 1.0.0 - SQLite replication and failover library

2019-08-29 Thread Free Ekanayaka
Hi, following up from my previous post back in 2017 [0], I'd like to announce version 1.0.0 of dqlite, a C library that brings data replication and high-availability to SQLite, using the Raft consensus algorithm. The biggest change is that Go is not used anymore, the engine itself is all pure C n