Scalable Database Server, HiRDB Version 8 Description
The process of row-partitioning an index for a table that has been row-partitioned is called index row partitioning. The index must be partitioned so that it corresponds to the row-partitioned table in terms of the multiple RDAREAs in which the table is stored. Such an index is called a row-partitioned index. When an index is row-partitioned, each user RDAREA or user LOB RDAREA can be handled independently during index batch creation or re-creation. Figure 3-22 illustrates index row partitioning.
Figure 3-22 Index row partitioning
When you have a row-partitioned table, you need to know whether an index being defined is a partitioning key index or a non-partitioning key index. For details about partitioning key indexes and non-partitioning key indexes, see Section (3) Partitioning key index and non-partitioning key index as follows. Table 3-6 shows guidelines for row-partitioning an index by index type.
Table 3-6 Guidelines for row-partitioning an index: HiRDB/Single Server
Index type | Partitioning guidelines |
---|---|
Partitioning key index | Row-partition the index so that it corresponds to the row-partitioned table. |
Non-partitioning key index | We recommend that the index not be row-partitioned, because row-partitioning the index can reduce the performance of index-based searches. However, if the table contains an extremely large amount of data, you may wish to consider row-partitioning it. Row-partitioning an index allows the system to manage the table storage RDAREAs and the index storage RDAREAs on a 1-to-1 basis, which will improve the operability of the utilities. For example, if data is loaded by RDAREA, or if RDAREAs are reorganized without the index having been row-partitioned, you will have to batch-create an index after you have loaded the data or reorganized the RDAREAs. If the index is row-partitioned, you will not have to batch-create an index after data loading or RDAREA reorganization. |
Figure 3-23 shows an example of row-partitioning an index for a HiRDB/Single Server.
Figure 3-23 Example of row-partitioning an index: HiRDB/Single Server
In the case of a HiRDB/Parallel Server, the index row partitioning guidelines depend on whether the table is partitioned within a server or among servers.
You need to know whether the index being defined is a partitioning key index or a non-partitioning key index. For details on partitioning key indexes and non-partitioning key indexes, see Section (3) Partitioning key index and non-partitioning key index below. Table 3-7 shows guidelines for row-partitioning an index by index type.
Table 3-7 Guidelines for row-partitioning an index: HiRDB/Parallel Server)
Index type | Partitioning guidelines |
---|---|
Partitioning key index | Row-partition the index so that it corresponds to the row-partitioned table. |
Non-partitioning key index | We recommend that the index not be row-partitioned, because row-partitioning the index can reduce the performance of index-based searches. However, if the table contains an extremely large amount of data, you may wish to consider row-partitioning it. Row-partitioning an index allows the system to manage the table storage RDAREAs and the index storage RDAREAs on a 1-to-1 basis, which will improve the operability of the utilities. For example, if data is loaded by RDAREA, or if RDAREAs are reorganized without the index having been row-partitioned, you will have to batch-create an index after you have loaded the data or reorganized the RDAREAs. If the index is row-partitioned, you will not have to batch-create an index after data loading or RDAREA reorganization. |
Figure 3-24 shows an example of row-partitioning an index within a server.
Figure 3-24 Example of row-partitioning an index within the server
You must row-partition the index so that it corresponds to the row-partitioned table. You need not know whether the index being defined is a partitioning key index or a non-partitioning key index. Figure 3-25 shows an example of row-partitioning an index among servers.
Figure 3-25 Example of row-partitioning an index among servers
An index that satisfies a particular condition becomes a partitioning key index. An index that does not satisfy the condition is called a non-partitioning key index. The condition is explained below. The condition is whether the table involved is partitioned on the basis of single-column partitioning or multicolumn partitioning. When only one column is used in the table partitioning condition, the partitioning is said to be single-column partitioning; when multiple columns are used in the table partitioning condition, the partitioning is said to be multicolumn partitioning.
An index satisfying one of the following conditions is a partitioning key index:
Figure 3-26 shows an example (based on the STOCK table) of an index that becomes a partitioning key index.
Figure 3-26 Partitioning key index: Single-column partitioning
CREATE INDEX A12 ON STOCK (PCODE ASC) 1 CREATE INDEX A12 ON STOCK (PCODE ASC,PRICE DESC) 2 CREATE INDEX A12 ON STOCK (PRICE DESC,PCODE ASC) 3
An index satisfying the following condition is a partitioning key index:
Figure 3-27 shows an example (based on the STOCK table) of an index that becomes a partitioning key index.
Figure 3-27 Partitioning key index: Multicolumn partitioning
CREATE INDEX A12 ON STOCK (SCODE ASC,PRICE DESC) 1 CREATE INDEX A12 ON STOCK (SCODE ASC,PRICE DESC,SQUANTITY ASC) 2 CREATE INDEX A12 ON STOCK (PRICE DESC,PCODE ASC) 3 CREATE INDEX A12 ON STOCK (SCODE ASC,SQUANTITY DESC,PRICE ASC) 4
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.