Scalable Database Server, HiRDB Version 8 Description
In the case of a HiRDB/Parallel Server, when multiple tables are joined, table data is read from the back-end servers where the individual tables are located and then matching is performed at a separate back-end server. This means that multiple servers are connected to transfer data. If the range of data to be searched for matches is located on a single back-end server, matching can be completed at the single back-end server by creating that data as a shared table. A shared table is a table stored in a shared RDAREA that can be referenced by all back-end servers. An index defined for a shared table is called a shared index. For details about shared tables, see the HiRDB Version 8 Installation and Design Guide.
Shared tables and shared indexes can also be defined for a HiRDB/Single Server. This provides SQL and UAP compatibility with a HiRDB/Parallel Server. Shared tables and shared indexes are usually used with a HiRDB/Parallel Server because they are especially effective in HiRDB/Parallel Servers. This section describes the use of shared tables with a HiRDB/Parallel Server. For details about using shared tables with a HiRDB/Single Server, see (6) Using shared tables with a HiRDB/Single Server below.
Because join processing can be completed by a single back-end server, the overhead associated with connecting between back-end servers and transferring data is reduced. Additionally, the number of back-end servers required for each transaction can be reduced, thereby improving the efficiency of parallel processing, particularly in the event of multiple executions.
We recommend that you create as a shared table a table that typically involves minor update processing, but which is referenced by multiple transactions, such as for join processing.
When you update a shared table, all back-end servers in which RDAREAs are allocated are locked. If you execute any statement other than the UPDATE statement or PURGE TABLE statement, which do not update index key values, you must specify IN EXCLUSIVE MODE with the LOCK TABLE statement and lock all back-end servers to update the shared table. This means that any jobs that access a locked RDAREA may result in deadlock, or that global deadlock may occur among the servers.
When you use a local buffer to update a shared table, issue the LOCK statement before you update. If you update without issuing the LOCK statement and the server process terminates abnormally, the abort code Phb3008 is output (which indicates that the unit may have terminated abnormally).
To define a shared table, specify SHARE with CREATE TABLE in the definition SQL (specify CREATE SHARE FIX TABLE). Note that shared tables must satisfy the following conditions:
The following limitations apply to using a shared table:
For details about the differences with a HiRDB/Parallel Server, see the HiRDB Version 8 Installation and Design Guide.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.