[
https://issues.jboss.org/browse/TEIID-2555?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2555:
---------------------------------------
The initial commit is in for 8.5 alpha1.
I have initially gone with the common table with a tuplebuffer set as a list abstraction
for pushdown. This is different than the pushdown of just the keys, which uses parameters
and references tuplebuffers on the command. These mechanisms should probably be
consolidated somewhat - however the current key pushdown logic is intended to be a
semi-join as duplicate rows have not been removed.
This begins with using the makedep join option. For consistency, the planning decision to
push the entire dependent join happens in RuleChooseDependent. For example:
select pm1.g1.e1, pm1.g1.e2, pm2.g1.e2 FROM pm1.g1, pm2.g1 where (pm1.g1.e1 = pm2.g1.e1)
option makedep pm1.g1(join)
This will result in two pushdown queries, the first to build the independent side:
SELECT g_0.e1, g_0.e2 FROM g1 AS g_0
The other is the full pushdown:
WITH X__1 (e1, e2) AS (?) SELECT g_0.e1, g_0.e2, g_1.e2 FROM g1 AS g_0, X__1 AS g_1 WHERE
g_0.e1 = g_1.e1
The source for full dependent join pushdown will be responsible for removing the with item
defined by a tuplebuffer and turning it into a temporary table. The reference to that
table must then be placed in the query as a substitute for the reference to the common
table. More changes will probably be desirable to convey the original metadata ids on the
with columns as otherwise all we have is the type information - however in cross source
situations having native information from the other side may not be that useful.
Support pushdown of entire dependent joins
------------------------------------------
Key: TEIID-2555
URL:
https://issues.jboss.org/browse/TEIID-2555
Project: Teiid
Issue Type: Sub-task
Components: Connector API, Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.5
If the data volume is not too large then in many circumstances pushing down the entire
independent side of the join to perform the entire join at the source can enhance
performance.
This would likely be built upon TEIID-2249 to make use of a make dep hint option. It
would also likely be an expansion of the common table pushdown logic - but will require
more extensive planning changes as the default logic is geared toward only the equi-join
columns.
It has also been requested that the default preference for pushdown be based upon the
estimated data width.
There is an issue with the form of the plan as with the existing logic it would be nearly
impossible to back out of the decision to perform the full pushdown (which is why a hint
is initially preferable).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira