I run a query on a database link to a Sybase server from Oracle.
In it, where clause is a date constraint, and I want it to be sysdate bound, so something like this:
select * from some_remote_view, where some_numeric_key = 1 and some_date> sysdate + 2
The problem is that when I explain the plan, only the condition some_numeric_key = 1 appears in the actual sql, which is deleted to the sybase server. Oracle expects the date filter to execute on its side.
This leads to a performance nightmare - I need the date filter removed so that this query works quickly
Even if I try something like casting sysdate into a charcater string, like this: TO_CNAK (SYSDATE-2, 'YYYY-MM-DD')
He still does not delete it.
Is there anything I can do to get Oracle to remove this date filter from the db link on Sybase?
Trant source share