-
1. Re: Avoid full table scans
rareddy Apr 23, 2018 8:44 AM (in response to tomesc)Looks like you have given your translator has the equality (=) check but not given the capability for < , <=, >, >= operation capabilities. Take look at "CompareCriteriaOrdered" and "CompareCriteriaOrderedExclusive" capabilities. For full translator capabilities see Translator Capabilities · Teiid Documentation
Even after this is done the JOINS will separate queries. However, if you provide the cardinality/cost information on the tables that your source model is generating/defining then optimizer is smarter to query left first and then use the results to fetch the right rather than the full scan. See the Schema Object DDL · Teiid Documentation for how to define this on a foreign table. If you are using Designer, then on the properties panel of the table you will see entry for this property.
HTH.
Ramesh..
-
2. Re: Avoid full table scans
tomesc Apr 23, 2018 10:07 AM (in response to rareddy)Thanks Ramesh, since my translator already had have the mentioned capabilites I think the "cardinality" was the reason. After I was setting the value to 10 million (for test), the right table was read with a where-clause (large combination of OR conditions).
FYI, below are my translator capabilites.
Thanks a lot.
Thomas
@Override
public boolean supportsCompareCriteriaEquals() {
return true;
}
@Override
public boolean supportsCompareCriteriaOrdered() {
return true;
}
@Override
public boolean supportsCompareCriteriaOrderedExclusive() {
return true;
}
@Override
public boolean supportsOrCriteria() {
return true;
}
@Override
public boolean supportsOnlyLiteralComparison() {
return true;
}
-
3. Re: Avoid full table scans
rareddy Apr 23, 2018 10:29 AM (in response to tomesc)Great, if this source you are writing the translator to is not an internal source, please consider donating the code to the community
-
4. Re: Avoid full table scans
tomesc Apr 23, 2018 10:44 AM (in response to rareddy)rareddy schrieb:
Great, if this source you are writing the translator to is not an internal source, please consider donating the code to the community
I plan so, as soon as it is more stable. The translator is for Adabas C (Software AG). I know there is already one on the teiid-marketplace on github which is using the CONNEX JDBC driver. Our connector use open source only