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.

3.2.4 Per<strong>for</strong>mance<br />

The SQL statement used by query rewrite is simpler and has a lower cost than running on the<br />

source tables because all calculations have been done when MQT was populated.<br />

If the final query plan comes from a rewritten query:<br />

► PLAN_TABLE shows the MQT used and its access path<br />

► TABLE_TYPE column shows the value 'M' <strong>for</strong> an MQT<br />

In<strong>for</strong>mational referential constraints are introduced to allow users to declare a referential<br />

constraint, avoiding the overhead of en<strong>for</strong>cing the referential constraints by <strong>DB2</strong>. This allows<br />

<strong>DB2</strong> to take advantage of the in<strong>for</strong>mation provided by the referential constraints (data<br />

associations) in query rewrite and some utilities.<br />

We now show some per<strong>for</strong>mance measurements using the functions supported in query<br />

rewrite using MQTs.<br />

Per<strong>for</strong>mance evaluation of MQTs<br />

The evaluation of per<strong>for</strong>mance of MQTs shows:<br />

► MQTs are not used <strong>for</strong> short running queries.<br />

► Query rewrite time grows reasonably when the number of eligible MQTs increases.<br />

► Basic query rewrite works. Results can be obtained directly from MQTs or derived from<br />

MQTs.<br />

► Query rewrite can select the best MQT from a set of qualified MQTs.<br />

The environment <strong>for</strong> MQT measurements<br />

► <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> V7 and V8 NFM<br />

► z/<strong>OS</strong> Release 1.4.0<br />

► z900 Turbo with 3 CPs<br />

► ESS 800 DASD<br />

► Three workloads with different profiles<br />

MQTs and short running queries<br />

Figure 3-9 shows the CPU time <strong>for</strong> a short running query.<br />

Chapter 3. SQL per<strong>for</strong>mance 45

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

Saved successfully!

Ooh no, something went wrong!