ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzajq_5.4.0.1/rzajqovrve.htm

120 lines
8.5 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="Overview of information available from Visual Explain" />
<meta name="abstract" content="You can use Visual Explain to view many types of information." />
<meta name="description" content="You can use Visual Explain to view many types of information." />
<meta name="DC.subject" content="query optimizer index advisor, in Visual Explain, Visual Explain, index advisor" />
<meta name="keywords" content="query optimizer index advisor, in Visual Explain, Visual Explain, index advisor" />
<meta name="DC.Relation" scheme="URI" content="visexpl.htm" />
<meta name="DC.Relation" scheme="URI" content="idxadvisor.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="rzajqovrve" />
<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>Overview of information available from Visual Explain</title>
</head>
<body id="rzajqovrve"><a name="rzajqovrve"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Overview of information available from Visual Explain</h1>
<div><p>You can use Visual Explain to view many types of information.</p>
<div class="section"><p>The information includes:</p>
<ul><li>Information about each operation (icon) in the query graph</li>
<li>Highlight expensive icons</li>
<li>The statistics and index advisor</li>
<li>The predicate implementation of the query</li>
<li>Basic and detailed information in the graph</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Information about each operation (icon) in the query graph</h4><p>As
stated before, the icons in the graph represent operations that occur during
the implementation of the query. The order of operations is shown by the arrows
connecting the icons. If parallelism was used to process an operation, the
arrows are doubled. Occasionally, the optimizer "shares" hash tables with
different operations in a query, causing the lines of the query to cross.</p>
</div>
<div class="section"><p>You can view information about an operation by selecting the icon.
Information is displayed in the <span class="uicontrol">Attributes</span> table in
the right pane. To view information about the environment, click an icon and
then select <span class="uicontrol">Display query environment</span> from the <span class="uicontrol">Action</span> menu.
Finally, you can view more information about the icon by right-clicking the
icon and selecting <span class="uicontrol">Help</span>.</p>
</div>
<div class="section"><h4 class="sectiontitle">Highlight expensive icons</h4><p>You can highlight problem
areas (expensive icons) in your query using Visual Explain. Visual Explain
offers you two types of expensive icons to highlight: by processing time or
number of rows. You can highlight icons by selecting <span class="uicontrol">Highlight
expensive icons</span> from the <span class="uicontrol">View</span> menu.</p>
</div>
<div class="section"><h4 class="sectiontitle">The statistics and index advisor</h4><p>During the implementation
of a query, the optimizer can determine if statistics need to be created or
refreshed, or if an index might make the query run faster. You can view these
recommendations using the Statistics and Index Advisor from Visual Explain.
Start the advisor by selecting <span class="uicontrol">Advisor</span> from the <span class="uicontrol">Action</span> menu.
Additionally, you can begin collecting statistics or create an index directly
from the advisor.</p>
</div>
<div class="section"><h4 class="sectiontitle">The predicate implementation of the query</h4><p>Visual
explain allows you to view the implementation of query predicates. Predicate
implementation is represented by a blue plus sign next to an icon. You can
expand this view by right-clicking the icon and selecting <span class="uicontrol">Expand</span>.
or open it into another window. Click an icon to view attributes about the
operation. To collapse the view, right-click anywhere in the window and select <span class="uicontrol">Collapse</span>.
This function is only available on V5R3 or later systems.</p>
</div>
<div class="section"><p>The optimizer can also use the Look Ahead Predicate Generation
to minimize the random the I/O costs of a join. To highlight predicates that
used this method, select <span class="uicontrol">Highlight LPG</span> from the <span class="uicontrol">View</span> menu.</p>
</div>
<div class="section"><h4 class="sectiontitle">Basic and full information in the graph</h4><p>Visual Explain
also presents information in two different views: basic and full. The basic
view only shows those icons that are necessary to understand the implementation
of the SQL statement, thus excluding some preliminary or intermediate operations
that are not essential for understanding the main flow of query implementation.
The full view may show more icons that further depict the flow of the execution
tree. You can change the graph detail by select <span class="uicontrol">Graph Detail</span> from
the <span class="uicontrol">Options</span> menu and selecting either <span class="uicontrol">Basic</span> or <span class="uicontrol">Full</span>.
The default view is <span class="uicontrol">Basic</span>. Note that in order to see
all of the detail for a <span class="uicontrol">Full</span> view, you will need to
change the Graph Detail to <span class="uicontrol">Full</span>, close out Visual Explain,
and run the query again. The setting for Graph Detail will persist.</p>
</div>
<div class="section"><p>For more information about Visual Explain and the different options
that are available, see the Visual Explain online help.</p>
</div>
<div class="section"><img src="./delta.gif" alt="Start of change" /><h4 class="sectiontitle">Refresh the Visual Explain diagram</h4><p>For
long running queries, you can refresh the visual explain graph with runtime
statistical information before the query is complete. Refresh also updates
the appropriate information in the attributes section of the icon shown on
the right of the screen. In order to use the <span class="uicontrol">Refresh</span> option,
you need to select <span class="uicontrol">Explain while Running</span> from the Run
SQL Scripts window.</p>
<p>To refresh the diagram, select <span class="uicontrol">Refresh</span> from
the <span class="uicontrol">View</span> menu. Or click the <span class="uicontrol">Refresh</span> button
in the toolbar.</p>
<img src="./deltaend.gif" alt="End of change" /></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="visexpl.htm" title="You can use the Visual Explain tool with iSeries Navigator to create a query graph that graphically displays the implementation of an SQL statement. You can use this tool to see information about both static and dynamic SQL statements. Visual Explain supports the following types of SQL statements: SELECT, INSERT, UPDATE, and DELETE.">View the implementation of your queries with Visual Explain</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="idxadvisor.htm" title="The query optimizer analyzes the row selection in the query and determines, based on default values, if creation of a permanent index improves performance. If the optimizer determines that a permanent index might be beneficial, it returns the key columns necessary to create the suggested index.">Query optimizer index advisor</a></div>
</div>
</div>
</body>
</html>