User guide

Using ENFORM Search Statistics
Using ENFORM Efficiently
5–4 058058 Tandem Computers Incorporated
The STRATEGY COST Line The final line of the statistics contains the value of STRATEGY COST. Possible values
of STRATEGY COST for successfully executed queries range from 1 to 8. In Figure 5-1,
the strategy cost is 2. The significance of the strategy cost values is as follows:
STRATEGY COST = 1
The query processor used keyed access on all files. A strategy cost of 1 might
occur when a single file is involved in a query with a request qualification (in a
WHERE clause) that compares the primary key of the file to a constant. This type
of query forces the query processor to access the records by the primary key.
STRATEGY COST = 2
The query processor might have to read one file completely. A strategy cost of 2
might occur when a single file is involved in a query with a request qualification
that specifies a nonkey field, compares a key field to a constant using the NOT
EQUAL operator, or compares a key field to another field in the same record.
STRATEGY COST = 3
The query processor might have to read more than one file completely. A strategy
cost of 3 might occur when two files are involved in the query and the query
processor uses the join strategy described previously in this section.
STRATEGY COST = 4
The query processor must sort one file once for a join strategy. A strategy cost of 4
might occur when two files are involved in a query and one of the fields used to
link record descriptions is either a nonkey field or a partial key field.
STRATEGY COST = 5
The query processor must sort more than one file once for a join strategy. A
strategy cost of 5 might occur when two files are involved in a query and both of
the fields used to link record descriptions are either nonkey fields or partial key
fields.
STRATEGY COST = 6
The query processor might have to sort one file more than once for a link. A
strategy cost of 6 might occur when:
A query involves at least three files.
The query processor uses a join strategy on the last two files read.
The query contains a request qualification that compares fields from one of the
files involved in the join strategy with fields from a nonjoin file.
The query processor must sort one of the files involved in the join strategy.