Nonstop Database, HiRDB Version 9 UAP Development Guide
HiRDB locks a resource to prevent unauthorized referencing or updating.
HiRDB performs locking to maintain database integrity. In a HiRDB/Parallel Server, closed locking is performed for each server, because resources are not shared among servers.
When a higher-level resource is locked, the resources under that resource need not be locked, because locked resources maintain inclusive relationships. The following figure shows the resources that can be locked and their inclusive relationships.
Figure 3-7 Locked resources and inclusive relationships
For purposes of lock control that the HiRDB system implements automatically, the minimum unit of resource locking (the row or the page) can be specified for each table.
You can also disable lock control with the index key value for an index. This setting is called non-locking of index key values.
Because the row is a smaller unit of resource locking than the page, the efficiency of concurrent execution improves, but processing time and memory requirements associated with locking increase.
To specify the row as the minimum unit of resource locking, use the CREATE TABLE, ALTER TABLE, or LOCK statement. For details, see the HiRDB Version 9 SQL Reference manual.
Compared with row-level locking, the processing time and memory requirements associated with locking decrease, but the efficiency of concurrent execution is reduced.
To specify the row as the minimum unit of resource locking, use the CREATE TABLE, ALTER TABLE, or LOCK statement. For details, see the HiRDB Version 9 SQL Reference manual.
Locking is applied only to the table and not to the index key value. This setting allows you to avoid the following problems:
For details about non-locking of index key values, see 3.4.6 Non-locking of index key values.
These three settings each have different tradeoffs. These tradeoffs must be considered when the minimum unit of resource locking is specified.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.