66 lines
3.9 KiB
HTML
66 lines
3.9 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Using MQTs during Query optimization" />
|
||
|
<meta name="abstract" content="Before using MQTs, you need to consider your environment attributes." />
|
||
|
<meta name="description" content="Before using MQTs, you need to consider your environment attributes." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqt.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzajqmqtusing" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Using MQTs during Query optimization</title>
|
||
|
</head>
|
||
|
<body id="rzajqmqtusing"><a name="rzajqmqtusing"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Using MQTs during Query optimization</h1>
|
||
|
<div><p>Before using MQTs, you need to consider your environment attributes.</p>
|
||
|
<div class="section"><p>To even consider using MQTs during optimization the following
|
||
|
environmental attributes must be true:</p>
|
||
|
</div>
|
||
|
<div class="section"> <ul><li>The query must specify ALWCPYDTA(*OPTMIZE) or INSENSITIVE cursor. </li>
|
||
|
<li>The query must not be a SENSITIVE cursor. </li>
|
||
|
<li>The table to be replaced with a MQT must not be update or delete capable
|
||
|
for this query. </li>
|
||
|
<li>The MQT currently has the ENABLE QUERY OPTIMIZATION attribute active </li>
|
||
|
<li>The MATERIALIZED_QUERY_TABLE_USAGE QAQQINI option must be set to *ALL
|
||
|
or *USER to enable use of MQTs. The default setting of MATERIALIZED_QUERY_TABLE_USAGE
|
||
|
does not allow usage of MQTs. </li>
|
||
|
<li>The timestamp of the last REFRESH TABLE for a MQT is within the duration
|
||
|
specified by the MATERIALIZED_QUERY_TABLE_REFRESH_AGE QAQQINI option or *ANY
|
||
|
is specified which allows MQTs to be considered regardless of the last REFRESH
|
||
|
TABLE. The default setting of MATERIALIZED_QUERY_TABLE_REFRESH_AGE does not
|
||
|
allow usage of MQTs. </li>
|
||
|
<li>The query must be capable of being run through SQE. </li>
|
||
|
<li>The following QAQQINI options must match: IGNORE_LIKE_REDUNDANT_SHIFTS,
|
||
|
NORMALIZE_DATA, and VARIABLE_LENGTH_OPTIMIZATION. These options are stored
|
||
|
at CREATE materialized query table time and must match the options specified
|
||
|
at query run time. </li>
|
||
|
<li>The commit level of the MQT must be greater than or equal to the query
|
||
|
commit level. The commit level of the MQT is either specified in the MQT
|
||
|
query using the WITH clause or it is defaulted to the commit level that the
|
||
|
MQT was run under when it was created.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajqmqt.htm" title="Materialized query tables (MQTs) (also referred to as automatic summary tables or materialized views) can provide performance enhancements for queries.">Materialized query table optimization</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|