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: query rewrite question

Re: query rewrite question

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 23 Jun 1999 21:54:46 +0100
Message-ID: <930171574.9802.0.nnrp-12.9e984b29@news.demon.co.uk>

Which base table is the TERM column in ?

Have you tried using the REWRITE hint to see if you can force the query rewrite to take place.

If the hint works, check the cost of the rewrite against the cost of not doing the rewrite.

I'm having a little trouble with query rewrites not happening too - but not on one that looks this straightforward, but I'll go back and check.

--

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

Eric Spear wrote in message <37714822.AB2FF2CF_at_deans.umd.edu>...
>I'm having trouble getting usefulness out of the query rewrite option.
>I'm running 8.1.5 on Solaris.
>
>My base "detail" table is called um_employee_detail. My materialized
>view is called um_employee_fact. It is defined here:
>
>create materialized view um_employee_fact
>nologging parallel
>build immediate
>refresh complete on demand
>enable query rewrite as
>select term,
> a.employee_demographics_key,
> a.hr_dept_Cd,
> count(*) as cnt,
> sum(fte) fte,
> sum(annual_salary) annual_salary
>from um_employee_detail a,
> um_employee_org b,
> um_employee_demographics c
>where a.hr_dept_cd = b.hr_dept_cd
>and a.employee_demographics_key = c.employee_demographics_key
>group by
> term,
> a.employee_demographics_key,
> a.hr_dept_Cd
>;
>
Received on Wed Jun 23 1999 - 15:54:46 CDT

Original text of this message

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