Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dblink: functions enforce tablescan
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>...Received on Wed Apr 19 2000 - 00:00:00 CDT
>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
>