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: Function use across database links

RE: Function use across database links

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Thu, 17 Oct 2002 08:04:53 -0800
Message-ID: <F001.004EC231.20021017080453@fatcity.com>


Melissa,  

I think the answer to your question is yes.  

First, if you think about it, it does not matter where the sql statement exists - either in the local or remote database - both would work as long as security is resolved and you have access to the remote table.  

For practicle purposes, I put the function on the remote server, and create a function on the local server that simply calls the remote one. I do this for two reasons:
  To protect the local applications from having to include the database link name in any of their applications - in case I need to change it for some reason
  And more importantly, I've found that it is best to perform the "where" clause on the machine where the data resides - it is just much faster than joining tables from a remote db across a db link. Maybe this functionality has improved with 9i, but with 8i, it is just too slow.  

Hope this helps.  

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Thursday, October 17, 2002 11:25 AM To: Multiple recipients of list ORACLE-L

List,

Oracle documentation indicates the Oracle database server breaks the distributed query into a corresponding number of remote queries which it then sends to the remote node for execution. The remote node executes the queries and sends the results back to the local node. Therefore, I ran a statement and explained it. The results show

SELECT STATEMENT Cost=8
  REMOTE  The question I have, is what if the sql is stored in a function that doesn't exist on the remote database. Will the Oracle server use the local function? If so, does it pull the data from the table on the remote server across the network.

I checked orafaq.com, but didn't find any hits on this subject, and was unable to locate any other documentation regarding function usage and Database links.

TIA
MCG
--

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 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Oct 17 2002 - 11:04:53 CDT

Original text of this message

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