I have a query on an Oracle database that involves accessing a remote database through a database link. Here's the query:
SELECT t1.col1 , t2.col2
FROM Table1 t1
LEFT JOIN Table2@dblink t2 ON (t1.id=t2.id)
When executing this query, I understand that it will open one session in the local database. However, I'm uncertain about the number of sessions that will be opened in the remote database query and will be executed from java application.
For instance, if I have approximately 100,000 records to retrieve, how many sessions will be opened in the remote database during the execution of this query?
I appreciate any insights or explanations regarding the session management behavior in this scenario.
1 Answer 1
The database link will open one session on the remote database, to support your one session and one query in the local database. Number of sessions has nothing to do with the number of records being retrieved unless you are forcing parallel execution, which you do not appear to be doing.