11.2 Examples

This section presents four examples of pdreclaim.

Organization of this section
(1) HiRDB single server configuration
(2) HiRDB parallel server configuration

(1) HiRDB single server configuration

Example 1:
This example releases used free pages in a table (TBL1). The example assumes that the table and indexes are defined as follows:
  • Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

  • Index definitions
CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03
Overview
[Figure]
[Figure]pdreclaim command

pdreclaim -k table -t TBL1

Explanation
-k table: Specifies that used free pages in a table are to be released.
-t TBL1: Specifies the table whose used free pages are to be released.
Example 2:
This example releases used free pages in all indexes defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:
  • Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

  • Index definitions
CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03
Overview
[Figure]
[Figure]pdreclaim command

pdreclaim -k index -t TBL1

Explanation
-k index: Specifies that used free pages in indexes are to be released.
-t TBL1: Specifies the table whose used free pages are to be released.

(2) HiRDB parallel server configuration

Example 3:
This example releases used free pages in a table (TBL1). The example assumes that the table and indexes are defined as follows:
  • Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

  • Index definitions
CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))
Overview
[Figure]
[Figure]pdreclaim command

pdreclaim -k table -t TBL1

Explanation
-k table: Specifies that used free pages in a table are to be released.
-t TBL1: Specifies the table whose used free pages are to be released.
Example 4:
This example releases used free pages in an index (IDX01) defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:
  • Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

  • Index definitions
CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))
Overview
[Figure]
[Figure]pdreclaim command

pdreclaim -k index -t TBL1 control_file

Explanation
-k index: Specifies that used free pages in indexes are to be released.
-t TBL1: Specifies the table whose used free pages are to be released.
control_file: Control information file
[Figure]Contents of the control information file (control_file)

idxname name=IDX01    [1]

Explanation
  1. Specifies the index whose used free pages are to be released.
Example 5:
This example releases used free pages from an index storage RDAREA (USER12) for an index (IDX01) defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:
  • Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

  • Index definitions
CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))
Overview
[Figure]
[Figure]pdreclaim command

pdreclaim -k index -t TBL1 control_file

Explanation
-k index: Specifies that used free pages in indexes are to be released.
-t TBL1: Specifies the table whose used free pages are to be released.
control_file: Control information file
[Figure]Contents of the control information file (control_file)

idxname name=IDX01 rdarea=USER12    [1]

Explanation
  1. Specifies the index whose used free pages are to be released and its index storage RDAREA.