cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Is it possible to create a materialized view which uses a parameter during manual refresh? Something like

CREATE MATERIALIZED VIEW "DBA"."MyView" in system as 
select * from X where X.date > PARAM

So that e.g. each week the materialized view can be refreshed to reflect the values of last week or so...

View Entire Topic
MCMartin
Participant

The workaround I use is an extra table just with the value of the parameter and then in the materialized view:

select * from X where X.date > (select max(PARAM) from paramtable)

Not elegant but it works.

VolkerBarth
Contributor
0 Likes

I'm assuming you are calling the MV explicitly in your queries (instead of relying on view matching)?

MCMartin
Participant
0 Likes

yes, I am not using the view for the optimizer