79 lines
5.3 KiB
HTML
79 lines
5.3 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="concept" />
|
|
<meta name="DC.Title" content="Materialized query table optimization" />
|
|
<meta name="abstract" content="Materialized query tables (MQTs) (also referred to as automatic summary tables or materialized views) can provide performance enhancements for queries." />
|
|
<meta name="description" content="Materialized query tables (MQTs) (also referred to as automatic summary tables or materialized views) can provide performance enhancements for queries." />
|
|
<meta name="DC.Relation" scheme="URI" content="per0001.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtsupport.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtusing.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtexample.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtalgorithm.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtunnecessary.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmqtsummary.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmsthctabl.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="rzajqmqt" />
|
|
<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>Materialized query table optimization</title>
|
|
</head>
|
|
<body id="rzajqmqt"><a name="rzajqmqt"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Materialized query table optimization</h1>
|
|
<div><p>Materialized query tables (MQTs) (also referred to as automatic
|
|
summary tables or materialized views) can provide performance enhancements
|
|
for queries.</p>
|
|
<p>This is done by precomputing and storing results of a query in the materialized
|
|
query table. The database engine can use these results instead of recomputing
|
|
them for a user specified query. The query optimizer will look for any applicable
|
|
MQTs and can choose to implement the query using a given MQT provided this
|
|
is a faster implementation choice. </p>
|
|
<p>Materialized Query Tables are created using the SQL CREATE TABLE statement.
|
|
Alternatively, the ALTER TABLE statement may be used to convert an existing
|
|
table into a materialized query table. The REFRESH TABLE statement
|
|
is used to recompute the results stored in the MQT. For user-maintained MQTs,
|
|
the MQTs may also be maintained by the user via INSERT, UPDATE, and DELETE
|
|
statements. </p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtsupport.htm">MQT supported function</a></strong><br />
|
|
Although a MQT can contain almost any query, the optimizer only supports a limited set of query functions when matching MQTs to user specified queries. The user specified query and the MQT query must both be supported by the SQE optimizer.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtusing.htm">Using MQTs during Query optimization</a></strong><br />
|
|
Before using MQTs, you need to consider your environment attributes.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtexample.htm">MQT examples</a></strong><br />
|
|
The following are examples of using MQTs.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtalgorithm.htm">Details on the MQT matching algorithm</a></strong><br />
|
|
What follows is a generalized discussion of how the MQT matching algorithm works.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtunnecessary.htm">Determining unnecessary MQTs</a></strong><br />
|
|
You can easily determine which MQTs are being used for query optimization.
|
|
However, you can now easily find all MQTs and retrieve statistics on MQT
|
|
usage as a result of iSeries™ Navigator and i5/OS™ functionality.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqmqtsummary.htm">Summary of MQT query recommendations</a></strong><br />
|
|
Follow these recommendations when using MQT queries.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="per0001.htm" title="This overview of the query optimizer provides guidelines for designing queries that will perform and will use server resources more efficiently.">Processing queries: Overview</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../db2/rbafzmsthctabl.htm">Create Table statement</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |