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: views with db links

RE: views with db links

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 12 Sep 2001 11:47:49 -0700
Message-ID: <F001.0038C145.20010912115031@fatcity.com>

Bill,

I too would love to hear from better experts than me.

I also have implemented queries using db links. In my rudimentary testing, I found that you need to create the view on the remote machine to get any decent kind of performance, and then access that view thru the db link. My guess as a result of my testing eas that Oracle does a very poor job here. It looked to me like the data was brought across the link, and then the "where" clause (meaning any table joins) was applied. This will not work at all, performance wise, if the tables in question are large.

On the other hand, if the view exists on the remote machine, the "where" clause gets properly executed by the optimizer on that machine.

As for joining tables across database links - again - it did not perform well for me. We ended up writing a cross-db audit/update process to get the data we wanted to query into our local database to support our queries.

Anybody else have any better luck? I would love to hear more experienced opinions

Hope this helps

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, September 12, 2001 2:15 PM To: Multiple recipients of list ORACLE-L

Hello,

Oracle 8.1.6 on Solaris 2.7.

Can any one provide me with information or a link regarding performance of views across database links?

I am thinking of the case where instance A has a view defined as "SELECT FLD1,FLD2,... FROM TABLE_T1_at_DBLINK".

Consider the case when a view such as this is referenced within a sql statement that joins this view with other local tables and also contains some WHERE conditions which reference a field in TABLE_T1.
Are the entire contents of TABLE_T1 transferred across the network, then the joins and where conditions are processed within the local instance? Or is the WHERE condition applied in the remote instance, and only rows which satisfy the condition are returned across the network?

I was under the impression that the former was true. Did the behaviour change in some previous version?

Thanks to any responders.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Bill Becker
  INET: beckerb_at_mfldclin.edu

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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
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 Wed Sep 12 2001 - 13:47:49 CDT

Original text of this message

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