使用聚合ORA-01792快速刷新物化视图时出错

时间:2015-09-21 22:15:57

标签: sql oracle plsql materialized-views

在尝试使用Oracle 12c中的聚合快速刷新物化视图时,我收到错误ORA-01792"表或视图中的最大列数为1000"。但是,视图的列数少于1000;甚至将基表的列(这是另一个快速物化视图)相加,我没有达到1000.我已根据Oracle手册和I&m; m已经完成了使用聚合的物化视图的所有限制几乎可以肯定我没有违反任何一个。不确定在另一个快速MV上创建快速MV是否有事可做。

脚本如下:

CREATE MATERIALIZED VIEW MVW_USER_PAYMENTS
TABLESPACE TESTING
NOCACHE
NOLOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
USING INDEX
            TABLESPACE TESTING_IDX
REFRESH FAST
START WITH TO_DATE('30-jul-2015 23:00:00','dd-mon-yyyy hh24:mi:ss')
NEXT SYSDATE+1/24 
WITH PRIMARY KEY
AS 
SELECT 
           ID,
           YEAR,
           NAME,
           -- Summarised fields
           SUM(TOTAL_AMOUNT) AS TOTAL_AMOUNT,  COUNT(TOTAL_AMOUNT) AS CNT_TOTAL_AMOUNT,
           SUM(VAL_INTEREST) AS VAL_INTEREST,  COUNT(VAL_INTEREST) AS CNT_VAL_INTEREST,
           .
           .
           .
       (more rows)
           .
           COUNT(*) AS TOTAL_RECORDS
FROM MVW_USER_PAYMENTS_ORIGINAL
GROUP BY 
           ID,
           YEAR,
           NAME;

非常感谢任何提示!

0 个答案:

没有答案