Thanks for the info. Actullay, I changed the primary key data type from decimal (28,7) to int. Actually, this is INT in Oracle databse but DI was taking and converting it to decimal. I did a cast and made it int type.
That has worked.
Also, I did not realize that if target has PK defined, we do not need to check that box “use i/p keys” Thank you for bringing that to my notice.
I also changed the dataflow property to pageable rather than in-memory.
Nothing in the monitor log?
Can you post the last five lines of the trace log?
Is it possible the dataflow starts and is waiting for the source database to retrieve the ordered dataset? Or from the comparison table and that takes so long?
The order-by of the query transform is pushed into the source database and for some reason it takes the source long time to sort - probably performing the sort via reading the primary key index. Split the existing query into two, the first remains as is only without the order by, the second query behind does the order-by. Now add a Map_Operation between the two queries to prevent the two queries being merged into one with the result of not having changed anything.
I realized my target (and also my comparison table) were not indexed on the primary key. Someone had dropped the indexes sometime back when they had dropped the table. I recreated the unique indexes and it works like charm just 10 seconds for around 100,000 records!
The importance of indexes to enforce primary keys cannot be overemphasized.