Pathmaker Programming Guide
Defining Data for a Pathmaker Project
Preparing for Pathmaker Application Development
2–38 067868 Tandem Computers Incorporated
When the Pathmaker product designates an access path as efficient, the Pathmaker
product assumes that NonStop SQL will be able to use an underlying index to
complete any FETCH operation that uses that access path. An access path with the
Efficient attribute equal to N is not necessarily inefficient, it just does not meet the
conditions the Pathmaker product has set for efficiency.
When you use the SQL Operations screen and the Operation Attributes screen to
direct the Pathmaker product to generate code for a FETCH operation on a single
table, you must name an access path to be used in the operation. Although you
can name an access path that is not efficient, you should do so with caution
because poor performance of the application could result.
Note The Efficient attribute of an access path is only recalculated when the access path is added or updated; it
is not recalculated each time the access path is listed.
Unique—Each access path has a Unique attribute (Y for yes or N for no) that can
be calculated by the Pathmaker product. The Unique attribute is significant for
SELECT operations, which always require an access path that is unique to operate
properly. The value of the Unique attribute also affects how the Pathmaker
product generates code for a FETCH operation.
The Pathmaker product considers an access path as unique if the access path
includes all of the columns of some unique index.
If you want the Pathmaker product to calculate the Unique attribute of a particular
access path, on the Table Access Paths screen, leave the Default field blank or enter
Y into this field and leave the Unique field blank when adding or updating an
access path. The Pathmaker product will display the value it calculates in the
Unique field.
If you want to force the value of the Unique attribute to Y, enter Y in the Default
field and Y in the Unique field on the Table Access Paths screen. For example, if
you know the access path columns will always contain data that identifies only
one row from a table, but you do not want to incur the overhead of creating a
unique index on this combination of columns, you might want to create an access
path for these columns and force it to be considered by the Pathmaker product as
unique.
If you use an access path that you have manually forced to be unique for a
SELECT operation, the operation will fail if the data in the columns is not truly
unique and the SELECT operation results in more than one row being retrieved.
Default Access Paths. When a base table or protection view is added to the project
catalog, the Pathmaker product creates default access paths if the following conditions
are met:
One unique access path is created on the primary key columns (including SYSKEY
when appropriate).