Re: [sqlite] Symmetric EXCEPT

2013-02-09 Thread Clemens Ladisch
Jamie Norrish wrote: > Is there any optimisation done for the case of a symmetric EXCEPT, to > avoid performing duplicate SELECT statements? Some subqueries can be flattened by SQLite, but otherwise, subqueries aren't really optimized at all. > (SELECT A... EXCEPT SELECT B...) UNION (SELECT B...

[sqlite] Symmetric EXCEPT

2013-02-09 Thread Jamie Norrish
Is there any optimisation done for the case of a symmetric EXCEPT, to avoid performing duplicate SELECT statements? E.g.: (SELECT A... EXCEPT SELECT B...) UNION (SELECT B... EXCEPT SELECT A...) would seem to be a poor approach to getting the set of rows in either A or B. Are there potentially bet