|
Thanks for your review, Jeff. The pushing is done before optimization... during preprocessing. Yes, we already have logic to find "pushable" predicates that are single table references only. My current UNION optimization further restricts to only BinaryOperators and InList, but I do plan to expand on that patch. These cases benifit the most, by using available index. I will address more generic predicates (still single table predicates) and possibly other ResultSet nodes (not just SelectNode) for trunk. (main development codeline) I will also look at other set operations then. You bring up a great point about pushing join predicates. I am not implementing this for UnionNode. I do see how it can improve performance though. It seems current optimizer doesn't optimize join predicates as much as possible. I have been seeing many large queries with a few levels of FromSubquery nesting, some with/without outer joins, that Derby doesn't seem to handle as good as other databases. I am interested in making improvements in this area. If you have sometime, it would be great to share your knowledge about what kind of join predicates Derby does handle currently, where it can see improvements and possibly some ideas on how it could be done. I think this would be great information to the community. Thanks, Satheesh Jeffrey Lichtman wrote: But if it's done during optimization, it would be possible to push joins into the union as long as it's in the right place in the join order. |
