On Fri, Dec 13, 2013 at 8:53 AM, Mark Brand <mabr...@mabrand.nl> wrote:

>
> Hi,
>
> I notice that EXPLAIN QUERY PLAN in sqlite 3.8.* doesn't mention the LEFT
> JOIN
> table in examples like the following. Sqlite 3.3.17 does mention it. Is
> this
> by design, or is something going wrong?
>
>
> CREATE TABLE aaa (a INTEGER PRIMARY KEY);
>
> CREATE TABLE bbb (b INTEGER PRIMARY KEY);
>
> CREATE VIEW vvv AS
> SELECT a, b
> FROM aaa
> LEFT JOIN bbb
> ON b=a;
>
> EXPLAIN QUERY PLAN SELECT 1 FROM vvv;
>

This is a feature, not a bug.

Since the LEFT JOIN makes no difference in the output, it gets omitted by
the query planner.



>
> /*
> sqlite 3.7.17
> 0|0|0|SCAN TABLE aaa (~1000000 rows)
> 0|1|1|SEARCH TABLE bbb USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)
>
> sqlite 3.8.2
> selectid|order|from|detail
> 0|0|0|SCAN TABLE aaa
> */
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to