I successfully create a materialized view with the script:
CREATE MATERIALIZED VIEW orderitem_mvmt
BUILD IMMEDIATE
REFRESH FAST
ON DEMAND
AS
select * from order_item;
Trying to increase performances I change like this
CREATE MATERIALIZED VIEW orderitem_mvmt
BUILD IMMEDIATE
REFRESH FAST
ON DEMAND
AS
select * from order_item
where to_char(last_upd,'yyyy') between to_char(sysdate,'yyyy')-3 and to_char(sysdate,'yyyy')+3;
Running the script raise the error ORA-12015: cannot create a fast refresh materialized view from a complex query
I don't understant how It match the Fast Refresh Restrictions
Thanks.