Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.4.6 Deleting data in units of chunks

To delete data in units of chunks, execute the PURGE CHUNK statement. The following describes how to use the PURGE CHUNK statement to delete data:

Deletion procedure

  1. Determine the chunk ID of the chunk to be deleted.

    To execute the PURGE CHUNK statement to delete the data in a chunk, determine the chunk ID of the chunk to be deleted. Chunk ID information is stored in the STATUS_CHUNKS system table.

    For details about how to determine the chunk ID, see C.9 Searching system tables.

  2. Execute the PURGE CHUNK statement.

    Execute the PURGE CHUNK statement for the determined chunk ID to delete the desired chunk.

    Note that you cannot delete the current chunk.

    For details about the PURGE CHUNK statement, see PURGE CHUNK (delete all rows in a chunk) in the manual HADB Command Reference.

You can specify a condition (INpredicate, quantified predicate) for the WHERE clause of the PURGE CHUNK statement to delete in a batch the chunks that satisfy the condition. For an example of specifying the PURGE CHUNK statement, see Example in Specification format and rules for the PURGE CHUNK statement of PURGE CHUNK (delete all rows in a chunk) in the manual HADB Command Reference.

Note
  • If you delete a chunk by using the PURGE CHUNK statement, you can reuse the storage area used by the chunk.

  • If you delete an archived chunk, the relevant archive files are also deleted.