Re: [sqlite] PATCH: updated compound query WHERE clause optimization

2007-05-19 Thread Joe Wilson
Improved patch against latest CVS with more comments and new test case attached. No regressions with make test. > This updated patch greatly improves query times against compound > SELECT statements (i.e., UNIONs) when the parent SELECT has a WHERE > clause.

[sqlite] PATCH: updated compound query WHERE clause optimization

2007-05-16 Thread Joe Wilson
This updated patch greatly improves query times against compound SELECT statements (i.e., UNIONs) when the parent SELECT has a WHERE clause. For example, this query: SELECT * FROM ( SELECT a,b FROM t1 UNION ALL SELECT x,y FROM t2 ) WHERE a>b; will be transformed into the more