Re: [sqlite] Query planner: Scanning subqueries vs using automatic covering index

2019-03-16 Thread Simon Slavin
On 15 Mar 2019, at 7:02pm, niklas wrote: > The data used for sqlite_stat1 in create.txt is taken from the real data, > it's copied from the sql-dump generated just after running ANALYZE. Okay. I should have guessed that. Sorry for doubting you. You seem to have figured out a work-around for

Re: [sqlite] Query planner: Scanning subqueries vs using automatic covering index

2019-03-16 Thread niklas
The data used for sqlite_stat1 in create.txt is taken from the real data, it's copied from the sql-dump generated just after running ANALYZE. I only wanted to include the minimum amount of data the demonstrate the issue so I omitted all other tables, views and data. As I understand it sqlite only

Re: [sqlite] Malformed schema (orphan index) on particular db with the version 3.27.2

2019-03-16 Thread Simon Slavin
On 16 Mar 2019, at 9:34am, Max Vlasov wrote: > So I suspect that the file is a very rare example of inconsistency of data > not compatible with recent version, but working with older ones. Integrity-checking has been improved since 3.26.0. Newer versions of SQLite check for types of corruptio

Re: [sqlite] Malformed schema (orphan index) on particular db with the version 3.27.2

2019-03-16 Thread Max Vlasov
I noticed I replied directly to drh with the integrity_check answer So I repeat the information here PRAGMA integrity_check in 3.26.0 says *** in database main *** Page 3 is never used { skipped about 20 lines } Page 268 is never used Additional information: - My logic behind the opening include