Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP Enable converting filter -> join when an index is available. #2164
Since join order was redone when delta queries appeared, I've just uncommented the filter to join transform to see what the new plans look like.
Do the new plans look good? What other kinds of interaction should I be testing for besides what I have in test/sqllogictest/index_planning.slt?
frankmcsherry left a comment
This looks sane!
I think there are still some things to sort out in join planning, where we should be able to communicate that forming an arrangement of a constant collection is cheap. I don't think we do that at the moment, and I don't know what the negative implications are (possibly that we never create a delta query for such a join plan, because we can never find the collection arranged). From the examples, it looks like we do build delta queries, but probably only because the linear implementation forces an arrangement which the delta query picks up.
Also, per comment at least one of the examples highlights that if we need cross joins to introduce constant values that are subsequently used in indexes, we might be paying a high price in order to get the improved efficiency later in the join.