Starting Visual Explain

There are two ways to invoke the Visual Explain tool. The first, and most common, is through iSeries™ Navigator. The second is through the Visual Explain (QQQVEXPL) API.

You can start Visual Explain from any of the following windows in iSeries Navigator:

Start of changeEnd of change

Start of changeYou have three options when running Visual Explain from Run SQL Scripts.End of change

Visual Explain only
This option allows you to explain the query without actually running it. The data displayed represents the query optimizer's estimates.
Note: When using the Explain only option of Visual Explain from Run SQL Scripts in iSeries Navigator, some queries receive an error code 93 stating that they are too complex for displaying in Visual Explain. You can circumvent this by selecting the "Run and Explain" option.
Run and Explain
If you select Run and Explain, the query is run by the system before the diagram is displayed. This option may take a significant amount of time, but the information displays is more complete and accurate.
Explain while running
For long running queries, you can choose to start Visual Explain while the query is running. By refreshing the Visual Explain diagram, you can view the progress of the query.

In addition, a database monitor table that was not created as a result of using iSeries Navigator can be explained through iSeries Navigator. First you must import the database monitor table into iSeries Navigator. To do this, right-click the SQL Performance Monitors and choose the Import option. Specify a name for the performance monitor (name it will be known by within iSeries Navigator) and the qualified name of the database monitor table. Be sure to select Detailed as the type of monitor. Detailed represents the file-based (STRDBMON) monitor while Summary represents the memory-resident monitor (which is not supported by Visual Explain). Once the monitor has been imported, follow the steps to start Visual Explain from within iSeries Navigator.

You can save your Visual Explain information as an SQL Performance monitor, which can be useful if you started the query from Run SQL Scripts and want to save the information for later comparison. Select Save as Performance monitor from the File menu.

Related information
Visual Explain (QQQVEXPL) API