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: select via dblink does not use index

Re: select via dblink does not use index

From: Yechiel Adar <adar76_at_inter.net.il>
Date: Thu, 04 Dec 2003 07:49:25 -0800
Message-ID: <F001.005D8CB6.20031204074925@fatcity.com>


Solved.

It was a hash join with the smaller table first but it pulled the whole 1M records for this.

There was a: where local_table.branch = 1 in the query. I changed it into: where remote_table.branch = 1 (there is an index on remote_table.branch) and it came down to 2 seconds.

Thanks all.

Yechiel Adar
Mehish
----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com> Sent: Wednesday, December 03, 2003 9:49 PM

> I did a select like:
>
> select name from local_table , remote_table
> where local_table.account = remote_table.account.
>
> Remote table is a view with dblink.
>
> I select about 100 records out of about 1M records at the remote db.
>
> I found out that oracle does full table scan at the remote site.
>
> I will welcome ideas how to make oracle use the index on the remote side.
>
> Yechiel Adar
> Mehish
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Yechiel Adar
> INET: adar76_at_inter.net.il
>
> 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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Yechiel Adar
  INET: adar76_at_inter.net.il

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 Dec 04 2003 - 09:49:25 CST

Original text of this message

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