I need to move data from an Oracle database to SQL Server.
If I run this very simple directly on the database, I get my results in < 1 second (returns 30K out of 250m rows):
select *
From my_table
where my_date = to_date('2024-09-17', 'YYYY-MM-DD')
But if it takes 1.5 minutes to run the exact same query using openquery / linked server
select *
FROM OPENQUERY(ORACLE_SERVER, 'select *
from my_table
where my_date = to_date(''17-09-2024'', ''DD-MM-YYYY'')') A
I tried with and without the to_date with no material changes.
I'm expecting the linked server to be slower, but not 100x.
Any idea where that could be coming from?
Thanks in advance