Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Database link performance

Re: Database link performance

From: Michael Rosenblum <mrosenblum_at_dulcian.com>
Date: Thu, 06 Jun 2002 08:03:24 -0800
Message-ID: <F001.004762D0.20020606080324@fatcity.com>


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 - 11:03:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US