>CREATE TABLE t1 (a INTEGER PRIMARY KEY);
CREATE TABLE t2 (a INTEGER PRIMARY KEY);
CREATE TABLE t3 (a INTEGER);
CREATE UNIQUE INDEX ndx on t3(a);
EXPLAIN QUERY PLAN SELECT t1.a FROM t1 left join t2 using (a);
0|0|0|SCAN TABLE t1
EXPLAIN QUERY PLAN SELECT t1.a FROM t1 left join t3 using (a);
Sorry, meant to post this
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
1 000
From: Hick Gunter<mailto:h...@scigames.at>
Sent: 29 January 2018 12:24
To: 'SQLite mailing list'<mailto:sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] [EXTERNAL] 3.22 'planner omits unused left joins'
The "unused left join" is not &
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: Re: [sqlite] [EXTERNAL] 3.22 'planner omits unused left joins'
Are you sure you’re using 3.22 Gunter? I can’t see any trace of t2 in the first
explain (with query plan omitted).
From: Hick Gunter<mailto:h...@scigames
TERNAL] 3.22 'planner omits unused left joins'
The "unused left join" is not "unused". Use "explain" instead of "explain query
plan" and you will see that the left join is performed in both cases. The
difference is that t2 has an INTEGER PRIMARY K
The "unused left join" is not "unused". Use "explain" instead of "explain query
plan" and you will see that the left join is performed in both cases. The
difference is that t2 has an INTEGER PRIMARY KEY and a lookup there is
apparently not printed out in the query plan. Table t3 has an explicit
6 matches
Mail list logo