To create dynamic cluster
tables in SPD Server, you must have a set of related SPD Server tables
that you want to cluster, such as tables that contain monthly sales
transactions. The SPD Server tables that you want to cluster must
all be in the same domain. They must use identical table structures
(columns and indexes) and compression. However, member table partition
sizes and member table owners can vary. These requirements ensure
the metadata compatibility that is necessary to create dynamic cluster
tables in SPD Server.
After you have organized
the SPD Server tables, issue a PROC SPDO command to bind the tables
into a dynamic cluster table.
The general form for
the PROC SPDO cluster create command is:
CLUSTER CREATE <cluster-tablename> MEM|MEMBER=<membername>
MAXSLOT=<max-slot-num-spec> UNIQUEINDEX=YES|NO
DELETE=YES|NO;
where
<cluster-tablename>
is
the name of the cluster table to be created
<member
name>
is the member table name
<max-slot-num-spec>
is
the maximum number of slots, or member tables, to be allocated for
the dynamic cluster. The default SPD Server setting for the MAXSLOT=
parameter is -1. A MAXSLOT= value of -1 configures SPD Server to permit
dynamic growth of the number of member tables in a cluster up to the
specified system maximum value. The system maximum value for the number
of slots is specified by the MAXGENNUM variable setting in the
spdsserv.parm configuration
file. If there is a known maximum number of slots to be enforced for
a particular dynamic cluster table, it is more efficient to specify
the limitation using the MAXSLOT= parameter when issuing the PROC
SPDO CREATE CLUSTER command.
The
CLUSTER
CREATE
command options are as follows:
UNIQUEINDEX=YES|NO
validates
a unique index. The default setting is YES.
DELETE=YES|NO
permanently
deletes the cluster and its members. The default setting is NO.
Dynamic Cluster Table shows a dynamic
cluster table with 24 members. Each member table is an SPD Server
table that contains monthly sales transactions.
The following code shows
the PROC SPDO command syntax that creates the dynamic cluster table
from the member tables:
PROC SPDO library=domain-name;
cluster create Sales_History
mem=sales200301
mem=sales200302
mem=sales200303
mem=sales200304
mem=sales200305
mem=sales200306
mem=sales200307
mem=sales200308
mem=sales200309
mem=sales200310
mem=sales200311
mem=sales200312
mem=sales200401
mem=sales200402
mem=sales200403
mem=sales200404
mem=sales200405
mem=sales200406
mem=sales200407
mem=sales200408
mem=sales200409
mem=sales200410
mem=sales200411
mem=sales200412
quit ;
PROC SPDO uses a LIBRARY
statement to identify the domain that contains the tables to be clustered.
The CLUSTER CREATE syntax specifies the name of the dynamic cluster
table to be created (Sales_History).
MEM= identifies the
members of the dynamic cluster table. The tables in the example represent
monthly sales transactions. This example uses 24 monthly sales tables
for the years 2003 and 2004.