Chapter 7. analyzing and tuning query performance, Analyzing queries in programs – HP Integrity NonStop H-Series User Manual
Page 75
dba/m Database Manager V7.1 User's Guide – 540156-001
7-1
CHAPTER 7.
ANALYZING AND TUNING
QUERY PERFORMANCE
Query performance depends on two major factors: the structure of the
queries, and the statistics of the tables referred to in the queries. Using
dba/m Database Manager, you can correlate the query to the statistics of
tables that are stored in NonStop SQL catalogs. Using dba/m Database
Manager, you also can study the impact of the structure of the query using
the methods identified by NonStop SQL’s explain function to retrieve data.
dba/m Database Manager provides an easy-to-use facility to fine-tune
queries by iteratively modifying queries and analyzing the performance of
the modified queries using the explain functions.
With the appropriate permission, you can use dba/m Database Manager to
simulate production statistics in a test or development environment. Using
this facility, you can predict performance in a production environment.
You can use dba/m Database Manager to analyze queries embedded in
programs or ad hoc queries.
Analyzing Queries in Programs
Use the Program Query Performance Analysis window to display the
Explain output for all of the queries in a program. Each time you compile a
program within dba/m Database Manager, a new version of the Explain
output is created. You can display the Explain output for any version of a
program.
You must compile programs under dba/m Database Manager control
in order to analyze queries in a program. Refer to Chapter 17,
Managing Programs, for instructions on compiling programs using dba/m
Database Manager.
To display the Program Query Performance analysis window, click on the
QueryAnalysis button in the Main Window, then click on Program. The
Program Query Performance Analysis window is displayed, as shown in
Figure 7-1.