07.02.2013 Views

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

Best Practices for SAP BI using DB2 9 for z/OS - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The unit of a value specified to MXDTCACH is in MB (1 MB is 1048576 bytes).<br />

For example, if a value 300 is specified, the total amount of up to 300 MB<br />

memory can be allocated <strong>for</strong> data caching per thread.<br />

► The <strong>DB2</strong> default value of 20 MB is far to low.<br />

► When the value of 0 (zero) is specified, the data caching method will not be<br />

used during query execution. Only sparse index (key+rid) can be applied.<br />

► The possible range of the values is between 0 and 512.<br />

► When data records are cached, the required memory amount is:<br />

(number of rows)*((maximum length of the keys) + (total maximum length of<br />

all the relevant columns))<br />

If the required memory exceeds the limit that MXDTCACH specifies or the<br />

memory allocation fails, the query will continue without <strong>using</strong> data caching.<br />

Sparse index will be used instead.<br />

► When the thread terminates, the allocated memory <strong>for</strong> data caching will be<br />

freed from the local pool above the 2 G bar.<br />

The new installation parameter MXDTCACH can be set on the <strong>DB2</strong> installation<br />

panel.<br />

Note: The existing installation parameter SJMXPOOL will be replaced by<br />

MXDTCACH. Accordingly, the data caching space <strong>for</strong> star join will be moved<br />

to the local pool above the 2 G bar.<br />

4.5 TRUNCATE TABLE statement<br />

The TRUNCATE TABLE statement deletes all data rows <strong>for</strong> either base tables or<br />

declared global temporary tables without activating delete triggers defined on the<br />

table (they are ignored). The base table can belong to a simple tablespace, a<br />

segmented tablespace, a partitioned tablespace, or a universal tablespace. If the<br />

table contains LOB or XML columns, its corresponding tablespaces and indexes<br />

are also emptied.<br />

<strong>DB2</strong> 9 trans<strong>for</strong>ms the new TRUNCATE TABLE operation into a mass delete<br />

operation to take advantage of the current, optimized design and to provide<br />

greater flexibilities <strong>for</strong> users to deactivate existing delete triggers and harden the<br />

results of truncate operation without issuing a normal commit.<br />

Under specific table attributes and statement options, the TRUNCATE TABLE<br />

statement may provide an optimal per<strong>for</strong>mance path to empty the table while in<br />

comparison with the current mass delete operation (that is, DELETE without<br />

50 <strong>Best</strong> <strong>Practices</strong> <strong>for</strong> <strong>SAP</strong> <strong>BI</strong> <strong>using</strong> <strong>DB2</strong> 9 <strong>for</strong> z/<strong>OS</strong>

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

Saved successfully!

Ooh no, something went wrong!