SQLite version 3.22.0 2018-01-22 18:45:57
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> CREATE TABLE t1 (a INTEGER PRIMARY KEY);
sqlite> CREATE TABLE t2 (a INTEGER PRIMARY KEY);
sqlite> CREATE TABLE t3 (a INTEGER);
sqlite> CREATE UNIQUE INDEX ndx on t3(a);
sqlite> EXPLAIN QUERY PLAN SELECT t1.a FROM t1 left join t2 using (a);
0|0|0|SCAN TABLE t1
sqlite> EXPLAIN QUERY PLAN SELECT t1.a FROM t1 left join t3 using (a);
0|0|0|SCAN TABLE t1
0|1|1|SEARCH TABLE t3 USING COVERING INDEX ndx (a=?)

Why is t3 with its unique index on a not omitted from the last query plan?

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to