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.

► Parallel sort enhancement<br />

Parallel sort is enabled <strong>for</strong> multiple-table sort (not restricted <strong>for</strong> single-table sort) <strong>for</strong> long<br />

running queries resulting in reduction of elapsed time. Parallel sort may need bigger work<br />

file buffer pool size, more work file or use Parallel Access Volume.<br />

► Table UDF improvement<br />

<strong>DB2</strong> allows you to specify the cardinality option when you reference a user-defined table<br />

function in an SQL statement. With this option, users have the capability to better tune the<br />

per<strong>for</strong>mance of queries that contain user-defined table functions.<br />

► ORDER BY in SELECT INTO with FETCH FIRST N ROWS<br />

It enables SELECT INTO to get the top rows based on a user-specified ordering, thereby<br />

reducing the need <strong>for</strong> a number of FETCHes.<br />

► Trigger enhancements<br />

This enhancement saves work file allocation if WHEN condition evaluates to false or<br />

transition file fits into working storage. This avoids work file creation at each trigger<br />

invocation.<br />

► REXX support improvements<br />

The per<strong>for</strong>mance of REXX programs accessing <strong>DB2</strong> tables is improved in <strong>DB2</strong> V8 if the<br />

program issues large numbers of SQL statements by avoiding loading DSNREXX at each<br />

REXX API invocation and optimizing REXX API initialization.<br />

► Dynamic scrollable cursors<br />

Dynamic scrollable cursor is a new option which allows the application to see the<br />

updated/inserted rows and goes against the base table. It does not create the temporary<br />

table needed <strong>for</strong> static scrollable cursors.<br />

► Backward index scan<br />

Potential per<strong>for</strong>mance enhancements through better access paths and potentially fewer<br />

required indexes.<br />

► Multiple distinct<br />

With <strong>DB2</strong> V7 only one DISTINCT keyword per SELECT/HAVING clause is allowed. If we<br />

need to aggregate (COUNT, SUM) by distinct values in more than one column, we must<br />

submit multiple queries. With <strong>DB2</strong> V8, a query with multiple DISTINCTs reduces CPU and<br />

elapsed time when compared to the time necessary in <strong>DB2</strong> V7 to execute multiple<br />

queries.<br />

► Visual Explain<br />

We provide an overview of the new Visual Explain and show examples of using the new<br />

Statistic Advisor function. Visual Explain was rewritten to provide better, faster analysis of<br />

problem queries. It provides much more detailed in<strong>for</strong>mation about the access path. It<br />

<strong>for</strong>mats the in<strong>for</strong>mation into an XML document which can be sent to the lab <strong>for</strong> analysis.<br />

The EXPLAIN tables have been enhanced <strong>for</strong> <strong>DB2</strong> V8, and a summary of these changes<br />

is provided in Appendix D, “EXPLAIN and its tables” on page 407.<br />

30 <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>

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

Saved successfully!

Ooh no, something went wrong!