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

Home -> Community -> Usenet -> c.d.o.server -> Re: dblink: functions enforce tablescan

Re: dblink: functions enforce tablescan

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: 2000/04/19
Message-ID: <956170238.12883.0.nnrp-03.9e984b29@news.demon.co.uk>#1/1

You could also try the old trick of:

    select * from a_at_dblink where b=

        (select f from dual);

I haven't tested it though.

--

Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Michel Cadot wrote in message <8dkg11$9fe$1_at_news3.isdnet.net>...

>You have to create the function on the remote database:
>
>v734> create database link refold using 'refold';
>Database link created.
>v734> create table t (col number primary key);
>Table created.
>v734> create function f return number as begin return 42; end;
> 2 /
>Function created.
>v734> explain plan for
>select * from t_at_refold where col=f;
>
>SELECT STATEMENT
> FILTER
> REMOTE (REFOLD.WORLD) (SELECT "COL" FROM "T" T)
>
>v734> explain plan for
>select * from t_at_refold where col=f_at_refold;
>
>SELECT STATEMENT REMOTE
> INDEX UNIQUE SCAN MMA$EP34087.SYS_C008074
>
Received on Wed Apr 19 2000 - 00:00:00 CDT

Original text of this message

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