On 31 Jan 2016, at 6:51pm, Yannick Duch?ne <yannick_duchene at yahoo.fr> wrote: > > In the meantime, I was looking at what SQLite do with the queries, to see if > it's intuitive, if it matches enough what one would devise without a DB > engine. I mean I sometime think about SQL as a data structure modelling > language, and I may try to re?implement in a classic procedural language, for > an experiment. I'm also aware this point of view (SQL as a data structure > modelling language) is less meaningful with complex queries, as with these, a > DB engine adds values outweighing the hopes one may get from a procedural > implementation, ? the same if the set of queries is not fixed.
It's all good. SQLite provides two wonderful tools to help you figure out what choices it's making and why: EXPLAIN and EXPLAIN QUERY PLAN. You can also experiment with ANALYZE which does a job which many people have wasted hours trying to do. Simon.