From jeroen.van.sluisdam@vrijuit.nl Wed, 29 Aug 2001 08:38:41 -0700
From: Jeroen van Sluisdam <jeroen.van.sluisdam@vrijuit.nl>
Date: Wed, 29 Aug 2001 08:38:41 -0700
Subject: help execution plan changes when using a dblink
Message-ID: <F001.0037B336.20010829080035@fatcity.com>
MIME-Version: 1.0
Content-Type: text/plain


Hi,

We face the strange problem that an executionplan is changed recently
without
any reason. Now it runs with a full_table scan and it did not do so.
The query is executed  through a dblink and is part of a batch.

- nothing has been changed recently in the app everybody agrees on here,
- analyze runs each weekend and a select count(*) differs slightly between
num_rows in
  dba_tables for the specific table
- when executing the query manually in two parts the subquery first and  ten
the value returned
  hardcoded in the main-query it performs very good
- when I ask for an explain plan in the database the link points to the
explain plan says it uses an index

Details: oracle 7.3.4, hp-ux 10.20
Query:
select * from debtor_claims@deca_link
where debtor_claim_id =
(
select max(debtor_claim_id)
from debtor_claims@deca_link
where res_id = 17777291 and
counter_booking_flag = 'N'
)

Tia,

Jeroen
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jeroen van Sluisdam
  INET: jeroen.van.sluisdam@vrijuit.nl

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


