Re: Can't create simple MV with FAST refresh
Jesse, don't have much experience with mv, but shouldn't "rowid" be included in "select" list? Igor Neyman, OCP DBA [EMAIL PROTECTED] - Original Message - To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]> Sent: Monday, September 09, 2002 4:18 PM > Thanks, but as I had mentioned, I've already tried that. > > One part I didn't include is that the table does not have a primary key and > cannot be made to have one, so I'm using ROWID. > > Rich Jesse System/Database Administrator > [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA > > > > -Original Message- > > From: Seefelt, Beth [mailto:[EMAIL PROTECTED]] > > Sent: Monday, September 09, 2002 1:53 PM > > To: Multiple recipients of list ORACLE-L > > Subject: RE: Can't create simple MV with FAST refresh > > > > > > > > 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 > > [EMAIL PROTECTED] Quad/Tech International, > > Sussex, WI > > USA > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Jesse, Rich > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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: Igor Neyman INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Can't create simple MV with FAST refresh
OK, so the MetaLink article seems to be really incomplete, as I found this hidden in the docs: "The WHERE clause can contain only joins and they must be equi-joins (inner or outer) and all join predicates must be connected with ANDs. No selection predicates on individual tables are allowed." OK, so I can't have selection predicates with a FAST refresh -- at least in 8i. So Im not sure an MV is going to give me a significant advantage here over a trigger. I just dont like the impact of several insert/update triggers (or one big one) on our G/L. Rich Jesse System/Database Administrator [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA > -Original Message- > From: Seefelt, Beth [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 1:53 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Can't create simple MV with FAST refresh > > > > Maybe the IN clause is throwing it? > > Try it with - > > where trans_type = 'A' or trans_type = 'B' > > Just a WAG... > > Beth -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jesse, Rich INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Can't create simple MV with FAST refresh
Thanks, but as I had mentioned, I've already tried that. One part I didn't include is that the table does not have a primary key and cannot be made to have one, so I'm using ROWID. Rich Jesse System/Database Administrator [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA > -Original Message- > From: Seefelt, Beth [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 09, 2002 1:53 PM > To: Multiple recipients of list ORACLE-L > Subject: RE: Can't create simple MV with FAST refresh > > > > 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 > [EMAIL PROTECTED] Quad/Tech International, > Sussex, WI > USA -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jesse, Rich INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: Can't create simple MV with FAST refresh
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 [EMAIL PROTECTED] Quad/Tech International, Sussex, WI USA -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jesse, Rich INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).