Run Visual Explain proactively (from Run SQL Scripts)

You can run Visual Explain to explain an SQL statement directly.  To explain (display) an SQL statement directly:

  1. In the System i Navigator window, expand the system you want to use.
  2. Expand Databases.
  3. Right-click the database that you want to work with and select Run SQL Scripts.
  4. If you have an existing SQL statement that you want to use, copy that statement and paste it into the Run SQL Scripts window.
  5. If you do not have an existing SQL statement, type a statement in the Run SQL Scripts window.
  6. Highlight the text of your statement and select Explain (or Run and Explain) from the Visual Explain menu. Or you can use the corresponding toolbar buttons.

Note: If you choose Explain from the Visual Explain menu, the system only displays your query diagram without actually running it. Information about eh query will represent the query optimizer's estimate and not actual data. If you choose Run and Explain from the Visual Explain menu, your query is run by the system before it is displayed. The results of the query (if any) are displayed in the Run SQL Scripts window.  Running and displaying your query could take a significant amount of time, but the information displayed will be more complete and accurate.