[sqlite] Outer Join with Where terms - possible optimization

2016-04-29 Thread Dan Kennedy
On 04/29/2016 09:41 PM, Josef Ku?era wrote: > Hello, > I have discovered a possible query planner improvement. I am using the SQLite > with virtual table modules. > > Situation 1: Lets have a query like 'SELECT V.* FROM (select A.RowID A_ROWID, > B.RowID B_ROWID, A.*, B.* from A left outer join

[sqlite] Outer Join with Where terms - possible optimization

2016-04-29 Thread Josef Kučera
Hello, I have discovered a possible query planner improvement. I am using the SQLite with virtual table modules. Situation 1: Lets have a query like 'SELECT V.* FROM (select A.RowID A_ROWID, B.RowID B_ROWID, A.*, B.* from A left outer join B on B.ref=A.key) V WHERE V.B_ROWID=?', where A and B