Running a SQL Query take a lot of time (more than 4 hour)

Hi Sir,
I am running a SQL query in UiPath and Oracle. (Same SQL query runs on both). But In UiPath running SQL query takes more than 4 hours while in Oracle it takes only 15-20 minutes to run. What may be the reason?? can anyone explain me?

I am connecting the database using the above connection.

Thanks in advance…

It could be that the query execution plan is cached in Oracle but needs to be run from scratch in UiPath.

Also, the memory usage when running from Oracle directly as apposed to running it via UiPath could differ.

Hi Sir,
In UiPath, can I implement a query execution plan in UiPath? should I ask query execution plan from the database team, and apply that in UiPath?