SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-13
Deferring Name Resolution
of an UPDATE statement, all affected partitions of the table and only the affected
partitions of indexes that include columns being updated must be available.
Consider this example:
Table X (columns A1, B1, C1, C2, C3, C4) resides on $VOL1
Index A using column A1 and B1 resides on $VOL3
Index B using column A1 and C4 resides on $VOL1
If a query is compiled to use index A as the access path and $VOL3 is down, the query
is recompiled to attempt to get the data by using index B or by using the primary key. If
you attempt to insert a row into table X with values for all the columns, the insert fails if
$VOL3 is unavailable. If you attempt an update for table X, in which columns C1 and
C2 are updated, the update completes even if $VOL3 is unavailable. Index A, which
resides on $VOL3, is not required for the update.
Deferring Name Resolution
Execution-time name resolution is the resolution of the name of an SQL object (table,
view, index, or partition), program, or catalog in an SQL statement, at statement
execution time rather than during explicit SQL compilation or at SQL load time. Thus, a
program can resolve SQL names at statement execution time without using dynamic
SQL statements. You can develop programs that run SQL statements against different
tables than those for which the programs were originally compiled.
SQL/MP resolves SQL names in static SQL statements as described next and as
shown in Figure 10-1 on page 10-14:
•
During explicit SQL compilation, SQL/MP resolves the names in SQL statements.
•
At SQL load time (which is when the first SQL statement in the program executes),
the SQL executor resolves the SQL names again, if the program is invalid or a
DEFINE specified in an SQL statement has changed since the last explicit SQL
compilation.
•
If execution-time name resolution is enabled, the SQL executor resolves names in
an SQL statement when the statement actually executes.
Execution-time name resolution applies to Guardian names and DEFINE names as
follows:
Execution-time name resolution is implemented by an option in the CONTROL QUERY
statement.
Name Description
Guardian file name
Class MAP DEFINE
SQL object (table, view, collation, index, and partition),
or SQL program
Guardian subvolume name
Class CATALOG DEFINE
SQL catalog