Jens Miltner wrote: > apart from a JOIN statement, there is no WHERE clause relating to table "a"
For purposes of optimization, an inner join is the same as a WHERE clause. > LEFT JOIN a ON a.b_id=b.id AND a.identifier=x.identifier An outer join, however, requires that the left table is used for the outer loop of the nested loop join, i.e., the database must take each record in a and looks up the corresponding record(s) in b. An index for a helps only when there is some (other) WHERE clause that restricts the eligible records in a. In theory, an index on a (automatic or not) should not be necessary for this query. In practice, what is the output of EXPLAIN QUERY PLAN for this query, and what is the column reported by the warning? Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users