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

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

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

With this SQL enhancement, a single FETCH can be used to retrieve multiple rows of<br />

data, and an INSERT can insert one or more rows into a table. This reduces the number of<br />

times the application and database must switch control. It can also reduce the number of<br />

network trips required <strong>for</strong> multiple fetch or insert operations <strong>for</strong> distributed requests. For<br />

some applications, this can help per<strong>for</strong>mance dramatically.<br />

► RUNSTATS improvements<br />

The improvements <strong>for</strong> RUNSTATS are related to the following areas:<br />

– Code optimization<br />

The changes have produced up to a 40% reduction in the execution time of a<br />

RUNSTATS TABLESPACE.<br />

– Distribution statistics<br />

This enhancement adds new functionality of calculating frequencies <strong>for</strong> non-leading<br />

and non-indexed columns to RUNSTATS. The relevant catalog tables are updated with<br />

the specified number of highest frequencies and optionally with the specified number of<br />

lowest frequencies. The new functionality also optionally collects multi-column<br />

cardinality <strong>for</strong> non-indexed column groups and column groups of non-leading index<br />

columns, and updates the catalog.<br />

– Fast-cached SQL statement invalidation<br />

This enhancement adds new functionality of allowing UPDATE NONE and REPORT<br />

NO keywords to be used on the same RUNSTATS utility execution. This causes the<br />

utility to only invalidate statements in the dynamic statement cache without any data<br />

access or computation cost.<br />

► Host variables’ impact on access paths<br />

The enhancement allows <strong>for</strong> a new BIND option, REOPT(ONCE). It allows you to<br />

re-optimize an SQL dynamic statement based on the host variable value, the first time it is<br />

executed. After that, the statement is stored in the dynamic statement cache.<br />

► Index only access <strong>for</strong> VARCHAR<br />

This enhancement removes the key padding associated with VARCHAR index columns.<br />

This allows the use of these columns to satisfy the results of queries that can use index<br />

only access.<br />

► Backward index scan<br />

The backward index chain has been introduced with Type 2 indexes. However, only in V7<br />

did <strong>DB2</strong> start to exploit the backward index chain <strong>for</strong> MIN and MAX functions. In V8, <strong>DB2</strong><br />

extends this functionality with the capability <strong>for</strong> backward index scans. This allows <strong>DB2</strong> to<br />

avoid more sorts and allows customers to define fewer indexes.<br />

► Local SQL cache issues and short prepare<br />

This enhancement reduces the cost of a short prepare.<br />

► Multiple IN values<br />

This enhancement causes the <strong>DB2</strong> optimizer to make a wiser choice when considering<br />

index usage on single table SQL queries that involve large numbers of IN list items.<br />

► Dynamic statement cache statement ID in EXPLAIN<br />

This enhancement allows the <strong>DB2</strong> EXPLAIN statement to report the chosen access path<br />

of an SQL statement currently in the dynamic statement cache (DSC).<br />

► Locking improvements<br />

The most important improvements in locking:<br />

– Reduced lock contention on volatile tables<br />

Chapter 1. <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 7

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

Saved successfully!

Ooh no, something went wrong!