[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] Query flattening for left joins involving subqueries on the right-hand side
From:       Kirill_Müller <krlmlr+ml () mailbox ! org>
Date:       2015-11-27 16:03:49
Message-ID: 56587EE5.8050102 () mailbox ! org
[Download RAW message or body]

On 27.11.2015 10:38, Clemens Ladisch wrote:
> Kirill Müller wrote:
>> I see no reason why the following two queries can't be executed with the same plans:
>>
>> ... t1 LEFT JOIN t2 ...
>> ... t1 LEFT JOIN (SELECT * FROM t2) ...
> In this case, the queries are identical.  But SQLite's query optimizer
> does not try to optimize this because such trivial subqueries are
> (thought to be) unlikely to occur in practice.
Thanks. It seems to work better for inner joins, though. The practical 
application is a query generator that relies on the SQL engine to be 
able to optimize this. Is there any chance that SQLite will be able to 
treat such queries more efficiently?


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic