Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g89Is7t18942
 for <oracle-l@naude.co.za>; Mon, 9 Sep 2002 14:54:07 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id LAA79226;
 Mon, 9 Sep 2002 11:53:59 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004CB3A0; Mon, 09 Sep 2002 10:53:23 -0800
Message-ID: <F001.004CB3A0.20020909105323@fatcity.com>
Date: Mon, 09 Sep 2002 10:53:23 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Seefelt, Beth" <Beth.Seefelt@TetleyUSA.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Seefelt, Beth" <Beth.Seefelt@TetleyUSA.com>
Subject: RE: Can't create simple MV with FAST refresh
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: text/plain;	charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by naude.co.za id g89Is7t18942


Maybe the IN clause is throwing it?

Try it with -

where trans_type = 'A' or trans_type = 'B'

Just a WAG...

Beth

-----Original Message-----
Sent: Monday, September 09, 2002 2:38 PM
To: Multiple recipients of list ORACLE-L


Hi all,

Using 8.1.7.4.0 on HP/UX with COMPATIBILE set to "8.1.7", I'm not able
to
create the following simple MV:

	CREATE MATERIALIZED VIEW qt_gl_trans_ab_mv
	TABLESPACE qt_mat_view
	BUILD IMMEDIATE
	USING INDEX TABLESPACE qt_mat_view PCTFREE 15 INITRANS 2  
	REFRESH FAST WITH ROWID
	USING LOCAL ROLLBACK SEGMENT rbsbig  
	START WITH SYSDATE 
	NEXT (TRUNC(SYSDATE+1) + 4/24) 
	AS
	select fiscal_year, fiscal_period, account_no,
		trans_type, trans_amount
	from my_general_ledge
	where trans_type in ('A','B')

It errors with ORA-12015 "cannot create a fast refresh snapshot from a
complex query".  According to MetaLink doc 179466.1, a complex query in
a MV
on 8.1.7 is one that has at least one of:

	- a distinct or unique keyword
	- an aggregate function (e.g. avg, count, max, min, sum, ....)
	- a connect by clause
	- a group by or order by clause
	- a set operator (UNION, UNION ALL, INTERSECT and MINUS)
	- joins other than those in a subquery

But my query has none of those?  Thinking somethings hosed or I'm
completely
misunderstanding the "IN" operator of the WHERE clause, I tried "where
trans_type = 'A'", but with the same results.

Also, I've created the MV log for the fast refresh:

	CREATE MATERIALIZED VIEW LOG ON my_general_ledger
		WITH  ROWID

I'm just testing out MVs here, but I'm missing something real simple
and/or
stupid here, but for the life of me I can't see what (even after a lunch
break).

Anyone?

Rich Jesse                           System/Database Administrator
Rich.Jesse@qtiworld.com              Quad/Tech International, Sussex, WI
USA
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jesse, Rich
  INET: Rich.Jesse@qtiworld.com

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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Seefelt, Beth
  INET: Beth.Seefelt@TetleyUSA.com

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

