Using A Local Partition - HP NonStop SQL/MP Programming Manual

For c
Table of Contents

Advertisement

C
Maximizing Local Autonomy
This appendix describes about the local autonomy in the NonStop SQL/MP
network-distributed database.
Topics include:

Using a Local Partition

Using TACL DEFINEs
Using Current Statistics
Skipping Unavailable Partitions
Local autonomy in a network-distributed database ensures that a program can access
data on the local node, regardless of the availability of remote SQL objects. In some
cases, the design of NonStop SQL/MP allows for local autonomy. For example, if a
DDL change alters a table on \NODEA when \NODEB is unavailable, an SQL program
file on \NODEB that uses the altered \NODEA table is not marked as invalid. The
invalid SQL program on \NODEB that is erroneously marked as valid is detected at run
time by the timestamp check and then automatically recompiled.
If your program accesses a network-distributed database, you can maximize local
autonomy by following these guidelines:
Use a local partition, rather than the primary partition, as the table name.
Use TACL DEFINEs.
Use current statistics.
Skip unavailable partitions.
For collations, NonStop SQL/MP supports run-time node autonomy, because collations
are stored in an SQL object's file label and within expressions that operate on the SQL
objects.
For example, suppose that you create a partitioned table named TABLEA with
partitions on \NEWYORK and \PARIS. TABLEA requires the collation
\NEWYORK.$SQL.COLLATE.FRENCH. If \NEWYORK goes down, programs on
\PARIS that refer to TABLEA continue to run because they get the collation information
from the TABLEA file label. However, the recompilation of a program on \PARIS that
uses TABLEA fails because the \NEWYORK.$SQL.COLLATE.FRENCH collation is not
available.
Using a Local Partition
If your program accesses a remote partition, the SQL compiler looks for information
about the table in a remote catalog. If the remote node is down, the SQL compilation
fails. However, if your program uses a local partition, the SQL compiler looks for the
information in a local catalog. If the local node and data are available, the SQL
compilation is successful.
HP NonStop SQL/MP Programming Manual for C—429847-008
on page C-2
on page C-2
on page C-3
C-1

Advertisement

Table of Contents
loading

Table of Contents