CURRENT REFRESH AGE special register
CURRENT REFRESH AGE specifies a timestamp duration value. This duration is the maximum duration since a REFRESH TABLE statement has been processed on a system-maintained REFRESH DEFERRED materialized query table such that the materialized query table can be used to optimize the processing of a query. This special register affects dynamic statement cache matching.
The data type of the register is DECIMAL(20,6). For a description of durations, see Datetime operands and durations.
If CURRENT REFRESH AGE has a value of 99999999999999 (ANY), REFRESH DEFERRED materialized query tables are considered to optimize the processing of a dynamic SQL query. This value represents 9999 years, 99 months, 99 days, 99 hours, and 99 seconds.
You can change the value of the register by executing the SET CURRENT REFRESH AGE statement.
EXEC SQL VALUES (CURRENT REFRESH AGE) INTO :CURMAXAGE;
The
value would be '99999999999999.000000'.