1 of 1 people found this helpful
Teiid supplies a very detailed query plan. The easiest way to obtain it is through the Eclipse Database Explorer from the Teiid Designer plugin. You can execute the query and obtain a graphical or textual plan. Alternatively, the docs describe a way here https://docs.jboss.org/author/display/teiid88final/Query+Plans
My observation is that you're doing a cross join with d3 and that normally is a pretty expensive operation. Of course, the queries that are pushed to your sources may also be inefficient.
Yes, as Mark is saying you can expect this query to be quite expensive just from having a cross join. You'll also want to look at adding cardinality and other costing information or hints that will enable Teiid to use federated join optimizations.