Scalable Database Server, HiRDB Version 8 Installation and Design Guide

[Contents][Index][Back][Next]

11.9 Page access using the snapshot method

When retrieval is performed but facilities designed to improve performance (such as the rapid grouping facility) cannot be applied, the global buffers are accessed several times to retrieve rows that satisfy the retrieval conditions. With the snapshot method, all rows in the buffer that match the retrieval conditions are copied into the process private memory the first time they are accessed, and when the same pages are accessed subsequently the retrieval result is returned by referencing the process private memory. Figure 11-4 provides an overview of the snapshot method.

Figure 11-4 Overview of the snapshot method

[Figure]

Organization of this section
(1) Effectiveness of accesses using the snapshot method
(2) Specification
(3) Considerations
(4) Snapshot method applicability

(1) Effectiveness of accesses using the snapshot method

Because the rows that match the conditions of a retrieval request are copied into the process private memory at the time of the first access, retrieval time for subsequent accesses is reduced. The number of times that the global buffers are accessed is also reduced, preventing a concentration of accesses on the global buffer.

(2) Specification

Specify SNAPSHOT (the default value) in the pd_pageaccess_mode operand.

(3) Considerations

When the snapshot method is specified for use, the process private memory is maintained automatically on the basis of the page size of the RDAREA where the table or index is stored. For details about calculating the size of the maintained process private memory for a HiRDB/Single Server, see 15.1.6(4) Procedure for obtaining the size of the memory required when the snapshot method is used; for a HiRDB/Parallel Server, see 15.2.6(5) Procedure for obtaining the size of the memory required when the snapshot method is used.

(4) Snapshot method applicability

Table 11-1 describes the applicability of the snapshot method for retrievals.

Table 11-1 Applicability of the snapshot method for retrievals

Condition Applicability
Tables Indexes
Retrievals for which pd_indexlock_mode=KEY is specified in the system common definition, yet the following conditions are not satisfied:
  • WITHOUT LOCK NOWAIT specified for retrieval
  • LOCK TABLE required for retrieval
N/R No
Retrievals using a holdable cursor No No
Retrievals for which the retrieval method is an index scan (INDEX SCAN, MULTI COLUMNS INDEX SCAN) WITHOUT LOCK WAIT is specified No No
Other than above No Yes
Retrievals for which the retrieval method is ROWID FETCH No N/R
Retrievals with the following columns specified:
  • VARCHAR, MVARCHAR, NVARCHAR columns with a defined length greater than 256 bytes
  • Recursive columns
  • Columns with abstract data types
  • LOB columns
  • Binary columns with a defined length greater than 256 bytes
WITHOUT LOCK WAIT is specified No Key
Other than above No Yes
Retrievals for which retrieval conditions specify a hit rate of 1 hit per page No No
Retrievals using a plug-in index No No
Retrievals in a dictionary table No No

Legend:
Yes: Applicable.
No: Not applicable.
Key: Applicable when the retrieval type is a key scan (KEY SCAN, MULTI COLUMNS KEY SCAN).
N/R: Not relevant or condition does not apply.