Force PDI to use DATE instead of TIMESTAMP in Parameterized SQL queries
If your query optimizer is incorrectly using the predicate TIMESTAMP, it is because the JDBC driver/database converts the data type from a TIMESTAMP to a DATE. In certain circumstances, this casting prevents the query optimizer of the database from using the correct index. For example, Oracle might state that it cannot use the index, and generates the following error message:
The predicate DATE used at line ID 1 of the execution plan contains an implicit
data type conversion on indexed column DATE. This implicit data type conversion prevents
the optimizer from selecting indices on table A.
To resolve this issue, use a Select Values step and set Precision to1
and Value to DATE
. These changes force the parameter to be set as a DATE instead of a TIMESTAMP.
PreviousDatabase locks when reading and updating from a single tableNextPDI does not recognize changes made to a table
Last updated
Was this helpful?