0
votes

I have a query like this:

Select A.table1.atr1, ... , B.table1.atr1
from A.table1
join B.table1 on (A.table1.atr1 =  B.table1.atr2)
join B.table2 on (B.table1.atr2 = B.table2.atr2)
...(some similar joins)
join A.table2 on (A.table1.atr1 =  A.table2.atr2)
where ...

A and B are jdbc datasources. I wonder how teiid handles multiple joins on the same database. Are they pushed down to the database? Is the join order between table A and B important? In my example i am using a join between A and B, then between B and B and then between A and A. Do i need to rearrange the order or to create 2 temporary tables on database A and database B?

1

1 Answers

0
votes

If the database supports joins, yes they can be pushed down. During the planning of the query Teiid optimizer checks the capabilities of source and decides it can be pushed or need to process in Teiid engine. Based on it, it will re-write the query.