-
1. Re: Multiple access patterns
shawkins May 13, 2015 10:22 AM (in response to markaddleman)No, currently the logic just checks that any one of the access patterns is satisfied. Do you have a dependent join scenario?
-
2. Re: Multiple access patterns
markaddleman May 13, 2015 11:26 AM (in response to shawkins)> Do you have a dependent join scenario?
Yes.
From a brief spelunking through the code, it appears that the relevant logic is in RulePlanJoins. I think that if we can maintain the ordered list of access patterns, I can influence the planner's decision by creating the metadata in my preferred order. Does that seem right to you?
-
3. Re: Multiple access patterns
markaddleman May 13, 2015 1:05 PM (in response to shawkins)There is a sort in org.teiid.query.optimizer.relational.rules.RulePlaceAccess.addAccessPatternsProperty(PlanNode, QueryMetadataInterface) that appears to be the culprit here. Is that sort necessary? Can I change the sorting logic in AccessPattern.compareTo?
-
4. Re: Multiple access patterns
shawkins May 13, 2015 1:40 PM (in response to markaddleman)> Is that sort necessary? Can I change the sorting logic in AccessPattern.compareTo?
No I don't think that the sort is necessary any more.
However I'm not sure if that will help out. The join logic should just be forming the dependent join based upon all of the equi-join predicates. The only time we consider less is when there is a key relationship.