Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Help with view, pushing predicate, and 9i
Content-Type: Text/Plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Two ideas, try disablyg complex view, sugin the hidden parameter, try usi=
ng
/*+ NO_MERGE */ =0D
=0D
-------Original Message-------=0D
=0D
From: oracle-l_at_freelists.org=0D
Date: 06/24/04 16:37:05=0D
To: oracle-l_at_freelists.org=0D
Subject: Help with view, pushing predicate, and 9i=0D
=0D
Hi,=0D
=0D
We have a view which is usually accessed like:=0D
select * from vu_xan_comp_agrmt_single where doc_id =3D3D :some_doc_id;=0D
=0D
In 8i (8.1.7.4 on Solaris 8), the 'doc_id=3D3D ' predicate is pushed into=
=0D
the view, and it works fine.=0D
=0D
We are in the process of converting this app to 9i (9.2.0.5 on Solaris=0D
8), and in 9i, the predicate is not pushed. This results in a full=0D
table scan on a large table, and, abysmal performance.=0D
=0D
This should NOT be a case where the predicate can't be pushed, due to=0D
rownum or analytical or aggregate function, etc. It works in 8i, so why=0D
not in 9i? Is this an optimizer bug? (_push_join_union_view and=0D
_push_join_predicate are both TRUE.)=0D
=0D
Any thoughts or suggestions are welcome.=0D
=0D
Thanks,=0D
=0D
-Mark=0D
=0D
PS Here's the beastie:=0D
CREATE OR REPLACE FORCE VIEW ADDS.VU_XAN_COMP_AGRMT_SINGLE=0D
(DOC_ID, VLAD_ID, CPAG_TEXT, CPAG_TEXT_LENGTH, CPAG_DAY_EFFECTIVE,=3D20=0D
CPAG_CALC_DATE, CPAG_FORMAT_MASK)=0D
AS=3D20=0D
select /*+ index(cpag cpag_indx_pr02) */ distinct doc_id, 0 vlad_id,=0D
first_value(cpag_text) over (partition by doc_id=0D
order by cpag_day_effective desc) cpag_text,=0D
first_value(length(cpag_text)) over (partition by doc_id=0D
order by cpag_day_effective desc) cpag_text_length,=0Dfirst_value(cpag_day_effective) over (partition by doc_id=0D order by cpag_day_effective desc) cpag_day_effective,=0D first_value(cpag_calc_date) over (partition by doc_id=0D order by cpag_day_effective desc) cpag_calc_date,=0D first_value(cpag_format_mask) over (partition by doc_id=0D
order by cpag_day_effective desc) cpag_format_mask=0Dfrom compressed_agreements cpag=0D
order by vlad_id,cpag_day_effective desc)=0Dcpag_text_length,=0D
order by vlad_id,cpag_day_effective desc) cpag_day_effective,=0D first_value(cpag_calc_date) over (partition by doc_id,vlad_id=0D order by vlad_id,cpag_day_effective desc) cpag_calc_date,=0D first_value(cpag_format_mask) over (partition by doc_id,vlad_id=0D order by vlad_id,cpag_day_effective desc)=0Dcpag_format_mask=0D
----------------------------------------------------------------=0DPlease see the official ORACLE-L FAQ: http://www.orafaq.com=0D
----------------------------------------------------------------=0DTo unsubscribe send email to: oracle-l-request_at_freelists.org=0D put 'unsubscribe' in the subject line.=0D --=0D
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Jun 24 2004 - 15:53:39 CDT