Re: [sqlite] Unexpected optimization

2018-03-22 Thread Richard Hipp
Max, Since you appear to be writing your own virtual tables, you could probably benefit from becoming more familiar with the internal workings of SQLite, and especially the ".wheretrace" and ".selecttrace" commands of the CLI. To enable those commands, build a new copy of the CLI that includes

[sqlite] Unexpected optimization

2018-03-22 Thread Max Vlasov
Hi, I noticed an unexpected optimization at the sqlite side. Currently I can not reproduce this with some arbitrary test data (probably I will eventually). Anyway the logic behind this (pseudo-code query) Select , (Select count(*) from LookUpTable where LookUpTable.Value=TableValue) as