On Fri, Jun 28, 2013 at 7:21 AM, E.Pasma <pasm...@concepts.nl> wrote:

>
> I tested the draft version ...
>

Thanks for the test report!


> Unfortunately I also found a bug. For some reason the optimizer may ignore
> a where clause on an outerjoined table. The example below shows this, as
> far as it appears in the execution plan. In my test there was also a
> difference in the number of returned rows.
>
> $ sqlite3
> SQLite version 3.8.0 2013-06-26 13:22:28
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> .read ttt130627.sql
> create table t (t integer primary key, x, y);
> create table t0 (t0 integer primary key, t, z);
> explain query plan
> select z from t0 left outer join t using (t) where t.t is null;
> 0|0|0|SCAN TABLE t0
>
>
There is a new optimization (only tangentially related to NGQP) that
attempts to remove tables from a join if the presence of those tables
cannot effect the output.  I think this issue is that optimization being
overzealous.  We will investigate.  Thanks.

-- 
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