dbms_system.set_sql_trace_in_session
We have a slow running query, that stalls for about 30 seconds or so when run via some application using the JDBC driver.
When the same query is run in SQLPLUS it takes less than one second.
So, using the above dbms_system procedure, I turned tracing on for the session.
Whilst trace is on, the system runs this query in a second, and the application works as expected.
So, my question is:
What does the plsql procedure set, that could affect the running query?