SQL Programming Manual for TAL

Program Compilation and Execution
HP NonStop SQL Programming Manual for TAL527887-001
5-17
Using the EXPLAIN Utility
Using the EXPLAIN Utility
The EXPLAIN utility generates reports about the execution plans used for each SQL
statement. You can use EXPLAIN reports to determine the database tables and
indexes used by your program. You can also determine whether creating other indexes
or modifying a query would improve the performance of your program. The EXPLAIN
utility has these report options:
EXPLAIN PLAN report
EXPLAIN DEFINES report
Figure 5-3. Sample SQL Compiler Listing (page2of2)
VST0503a.vsd
SQL - Elapsed Time 00 : 00 : 34.294
BINDER - OBJECT FILE BINDER - T9621C30 - (01NOV91) SYSTEM \SYS1.
Copyright Tandem Computers Incorporated 1982-1989, 1991
Object file \SYS1.$VOL1.SQLTAL.PROGOBJ
TIMESTAMP 1991-11-15 10:08:10
Heap location: Extended data space
PAGE 2
11/15/91 - 10 : 08 : 10
Heap size in pages1
Top of stack location in words420
Code segment1
Binder Warnings0
Binder Errors0
Code Pages
2
Primary data words
12
Secondary data words408
Data pages64
Resident code pages0
Extended data pages2
PAGE 1
11/15/91 - 10 : 08 : 10
SQL ************************************************************************************
SQL - Summary of SQL Compiling
SQL ************************************************************************************
SQL - > > > SQL COMPILATION STORED IN PROGRAM FILE < < <
SQL - Program file is \SYS1.VOL1.SQLTAL.TROGOBJ
SQL - Compile Time 00 : 00 : 01 .137
SQL - Number of other Errors = 0
SQL - Number of SQL Warnings = 0
SQL - Number of SQL Errors = 0
SQL - Number of SQL Statements = 6