13.17 Shared tables

In the case of a HiRDB/Parallel Server, when multiple tables are joined, table data is read from the back-end servers where 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 a 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. Only an updatable back-end server can update shared tables. Other back-end servers are referred to as reference-only back-end servers. Because there are limitations on updating a shared table, it is important that you do not update shared tables during online operations. For details about updating shared tables, see 13.17.3 Manipulating shared tables. Figure 13-28 shows join processing without using a shared table, and Figure 13-29 shows join processing using a shared table.

Figure 13-28 Join processing without using a shared table

[Figure]

Explanation:
This example joins tables A and B.
BES1, BES2: Retrieve data from table A and transfer it to BES5 and BES6 for matching.
BES3, BES4: Retrieve data from table B and transfer it to BES5 and BES6 for matching.
BES5, BES6: Perform matching and join processing and then transfer data to the FES.
FES: Merges the joined data and sends the result to the user.

Figure 13-29 Join processing using a shared table

[Figure]
Explanation:
This example joins tables A and B. Table B is a shared table that contains shared data. The search ranges are located in back-end servers BES2 and BES3.
BES1, BES4, BES5, BES6: No processing.
BES2, BES3: Retrieve data from tables A and B, perform merge processing, and then transfer the data to the FES.
FES: Sends the results to the user.

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. The following subsections describe the use of shared tables with a HiRDB/Parallel Server. For details about using shared tables with a HiRDB/Single Server, see 13.17.7 Using shared tables with a HiRDB/Single Server.

Organization of this section
13.17.1 Effects and criteria
13.17.2 Definition method
13.17.3 Manipulating shared tables
13.17.4 Limitations on shared tables
13.17.5 Notes about execution of definition SQL statements, utilities, and operation commands
13.17.6 Notes about using Real Time SAN Replication
13.17.7 Using shared tables with a HiRDB/Single Server