Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Database link performance
Tom,
I tried both ways:
- creating the view on db_B and query it from db_A
No difference.
Michael Rosenblum,
Dulcian Inc.
-----Original Message-----
Sent: Thursday, June 06, 2002 1:07 PM
To: 'ORACLE-L_at_fatcity.com'
Cc: 'mrosenblum_at_dulcian.com'
Mike,
you created the view on the db_B machine and called it from db_A, right?
"To Tom Mercadante: creating of a view, that does filtering, did not help. Absolutely the same results!"
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Thursday, June 06, 2002 12:03 PM
To: Multiple recipients of list ORACLE-L
Hi, all!
Thanks for your help and suggestions. Here is some feedback on what I have found on the performance problem of the querying data between two databases using DB links.
To John Kanagaraj: filter by ROWNUM does not make any difference - I have absolutely the same speed, when querying table with 5000 rows and filtering 'where ROWNUM <5000'.
To Tom Mercadante: creating of a view, that does filtering, did not help. Absolutely the same results!
Just remind you the case:
declare
v_record B%rowtype;
cursor cB
is
select *
from B_at_db_B.mycomp.com
where rownum < 5000;
begin
for c in cB
loop
v_record :=c;
end loop;
end;
My next step has been to analyze session-level statistics.
When using link we have physically two sessions - from a client to db_A
(opened explicitly) and from db_A to db_B (opened by Oracle
automatically). After execution of a script:
- in the session to db_A we have 10000 SQL*Net roundtrips to/from
db_link
But when I am running the same script directly (from client to db_B) - there is only ONE SQL*Net roundtrip to/from the client.
I asked Paul Dorsey to check it out with Tom Kyte at yesterday's NYOUG meeting.
Tom told us that Oracle 8.* does single record fetches when using database links. In general, database links have been tuned to support database replication. It means, that 'create table new_A as select . from table_A_at_db_B' runs quickly but querying from new_A is quite slow.
The remaining question: has anybody tried to use database links in Oracle9i? Does the same single fetch limitation apply?
Thank you,
Michael Rosenblum
Dulcian Inc.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Michael Rosenblum INET: mrosenblum_at_dulcian.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Jun 06 2002 - 13:23:33 CDT