19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Special register CURRENT REFRESH AGE<br />

The value in this special register represents a refresh age. The refresh age of an MQT is the<br />

timestamp duration between the current timestamp and the timestamp of the last REFRESH<br />

TABLE statement <strong>for</strong> the MQT.<br />

This special register controls whether an MQT can be considered in query rewrite as follows:<br />

► Value “0” means no MQTs are considered in query rewrite<br />

► Value “ANY” means all MQTs are considered in rewrite<br />

The default value of this special register can be specified in the CURRENT REFRESH AGE<br />

field on panel DSNTIP4 at installation time.<br />

The data type <strong>for</strong> CURRENT REFRESH AGE is DEC(20,6).<br />

Note: The default value disables query rewrite. Add SET CURRENT REFRESH AGE ANY<br />

to make sure of the use of MQT. You can verify this with Explain.<br />

Setting the CURRENT REFRESH AGE special register to a value other than zero should be<br />

done with caution. Allowing a materialized query table that may not represent the values of<br />

the underlying base table to be used to optimize the processing of a query may produce<br />

results that do not accurately represent the data in the underlying table.<br />

Note: You need to add the new DSNZPARM with REFSHAGE=ANY to enable query<br />

rewrite as a default.<br />

Special register CURRENT MAINTAINED TABLE TYPES<br />

This special register specifies a VARCHAR(255) value. The name of the dynamic ZPARM is<br />

MAINTYPE. The value identifies the types of MQT that can be considered in query rewrite:<br />

► Value 'SYSTEM' means all system-maintained, query optimization enabled MQTs<br />

► Value 'USER' means all user-maintained, query optimization enabled MQTs<br />

► Value 'ALL' means all query optimization enabled MQTs<br />

The initial value of this special register is determined by the value of field CURRENT MAINT<br />

TYPES on installation panel DSNTIP6. The default of this field is SYSTEM.<br />

Figure 3-6 shows the relationship between the two special registers <strong>for</strong> MQTs.<br />

CURRENT<br />

REFRESH<br />

AGE<br />

ANY<br />

Figure 3-6 Relationship between two special registers <strong>for</strong> MQTs<br />

42 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong><br />

0<br />

default<br />

CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION<br />

SYSTEM USER ALL NONE<br />

All system-<br />

maintained<br />

query<br />

optim ization<br />

enabled<br />

MQTs<br />

All user-<br />

maintained<br />

query<br />

optimization<br />

enabled<br />

MQTs<br />

All<br />

query<br />

optimization<br />

enabled<br />

MQTs<br />

None<br />

None None None None

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!