Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.18.1 Overview of the updated-row columnizing facility

If the INSERT or UPDATE statement is executed for a column store table, the added or updated data is stored in the column store table in row store format. For a column store table whose data is stored in row store format, the retrieval performance might be degraded in processes that exploit the characteristics of column store tables. These processes include data retrieval in a specific column and summation of values in a specific column. The data compression rate might also be degraded. If the updated-row columnizing facility is used and data is stored in row store format in a column store table, HADB automatically converts the data into column store format. This prevents the retrieval performance for column store tables and the data compression rate from being degraded. In situations where the INSERT or UPDATE statement might be executed for a column store table, use the updated-row columnizing facility.

The following figure provides an overview of the updated-row columnizing facility.

Figure 11‒46: Overview of the updated-row columnizing facility

[Figure]

■ Maintenance processing

The processing that converts data stored in a column store table from row store format to column store format is called maintenance processing. The maintenance processing consists of three processing stages: analysis, re-allocation, and reuse. For details about the maintenance processing, see 11.18.7 Details of the maintenance processing.

Important
  • The maintenance processing is not performed while a transaction or command is running, thus preventing the processing performance of the transaction or command from being affected. If a transaction or command starts while maintenance processing is in progress, the maintenance processing is interrupted. In this case, the maintenance processing is restarted after the processing of the transaction or command is completed.

    Note that "command" here refers to a command that connects to the HADB server. For details about the commands that connect to the HADB server, see List of commands in List of Commands and Common Rules in the manual HADB Command Reference.

  • In a system in which transactions or commands are continuously running, time for executing the maintenance processing cannot be secured. In such a system, do not use the updated-row columnizing facility.

■ Relationship with reorganization of tables or chunks

If the updated-row columnizing facility is used, data in row store format is converted to column store format. However, the following types of row data that has become invalid are not deleted:

  • Update-source row data that was updated by using the UPDATE statement

  • Row data that was deleted by using the DELETE statement

To delete row data that has become invalid, you must perform table or chunk reorganization. If you perform table or chunk reorganization, the pages that store the row data that has become invalid become reusable.

If you use the INSERT or UPDATE statement to add or update a large amount of data at one time, many row-data segments will be created. In such a case, you cannot prevent degradation of retrieval performance or data increase in the database even by using the updated-row columnizing facility. Therefore, if you have added or updated a large amount of data by using the INSERT or UPDATE statement at one time, consider executing table or chunk reorganization.

Note

We recommend that you use both the updated-row columnizing facility and table or chunk reorganization. For an example of this type of operation, see 11.4.23 Operation taking background import and chunks into consideration (Example 1: Adding and deleting data on a regular basis).

■ Restrictions

The updated-row columnizing facility is not applied to column store tables for which B-tree indexes are defined.