On 25.11.2015 16:32, Clemens Ladisch wrote: > Kirill M?ller wrote: >> For a left join with a subquery on the right-hand side, that subquery >> doesn't seem to be flattened. > This is rule 3 of <http://www.sqlite.org/optoverview.html#flattening>. Thanks, missed that. While true, I wonder if this rule might be relaxed a bit. The SQL is produced by a very generic SQL query generator, which just uses subqueries for everything table-like.
-Kirill