Filters comparing SYSDATE or SYSTIMESTAMP can lead to bad join orders
Details
| Detail name | Value |
|---|---|
| Changelog Number | 10468 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 6.1.0, Exasol 6.2.0, Exasol 7.0.rc1 |
| Fix Versions | Exasol 7.0.1 |
| Resolution Date | 2020-09-23 |
Description
Filters comparing SYSDATE or SYSTIMESTAMP using less than / greater than operators can lead to bad join orders due to incorrect estimates.
This problem is only relevant for queries joining multiple tables, where these filters influence the join order of tables.
Workaround
Instead of using SYSDATE or SYSTIMESTAMP directly, you can replace these with equivalent expressions:
add_days(SYSDATE,0) add_seconds(SYSTIMESTAMP,0)