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: Newbie question on materialized view

Re: Newbie question on materialized view

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Tue, 3 Dec 2002 23:25:09 +1000
Message-ID: <Z91H9.89405$g9.251365@newsfeeds.bigpond.com>


"Frank" <fbortel_at_home.nl> wrote in message news:3DE9F4D4.3050309_at_home.nl...
> Jonathan Lewis wrote:
> > But it is a single table aggregate view.
> >
> <snip>
>
> You need count(*), count(f2), sum(f2)...
> Connected to:
> Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
> With the Partitioning option
> JServer Release 8.1.7.4.0 - Production
>
> SQL> create table t_test (f1 number, f2 number);
>
> Table created.
>
> SQL> create materialized view log on t_test
> 2 with rowid (f1, f2)
> 3 including new values;
>
> Materialized view log created.
>
> SQL> create materialized view mv_t_test
> 2 build immediate refresh fast on commit
> 3 enable query rewrite
> 4 as select
> 5 f1, count(*), count(f2), sum(f2)
> 6 from t_test
> 7 group by f1;
>
> Materialized view created.
>
> Grtz, Frank
>

Hi Frank,

Why is it they listen to you but they never listen to me ?

sniff, ..., wipe, ...., sigh ........

Richard Received on Tue Dec 03 2002 - 07:25:09 CST

Original text of this message

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