Ludzie pragną czasami się rozstawać, żeby móc tęsknić, czekać i cieszyć się z powrotem.
2.
For SMP shared disk clusters, Oracle uses a round-robin mechanism to
assign devices to nodes. Similar to item 1, this device-to-node affinity is
used in determining parallel process allocation and work assignment.
3.
For SMP, cluster, and MPP architectures, process-to-device affinity is
used to achieve device isolation. This reduces the chances of having
multiple parallel server processes accessing the same device
simultaneously. This process-to-device affinity information is also used
in implementing stealing between processes.
For partitioned tables and indexes, partition-to-node affinity information
determines process allocation and work assignment. For shared-nothing MPP
systems, the Oracle Parallel Server tries to assign partitions to instances taking 21-40 Oracle8 Server Concepts
the disk affinity of the partitions into account. For shared-disk MPP and cluster systems, partitions are assigned to instances in a round-robin manner.
Affinity is only available for parallel DML when running in an Oracle Parallel Server configuration. Affinity information which persists across statements
will improve buffer cache hit ratios and reduce block pings between instances.
Other Types of Parallelism
In addition to parallel SQL execution, Oracle can use parallelism for the
following types of operations:
•
parallel recovery
•
parallel propagation (replication)
•
parallel load (the SQL*Loader utility)
Like parallel SQL, parallel recovery and parallel propagation are executed by
a parallel coordinator process and multiple parallel server processes. Parallel load, however, uses a different mechanism. See Oracle8 Server Utilities for information about parallel load and general information about SQL*Loader.
Also see Oracle8 Server Tuning for advice about using parallel load.
The behavior of the parallel coordinator and parallel server processes may
differ, depending on what kind of operation they perform (parallel SQL,
parallel recovery, or parallel propagation). For example, if all parallel server processes in the pool are occupied and the maximum number of parallel
server processes has been started:
•
When acting in the parallel SQL role, the parallel coordinator switches
to serial processing.
•
When acting in the parallel propagation role, the parallel coordinator
returns an error.
For a given session, the parallel coordinator coordinates only one kind of
operation. A parallel coordinator cannot coordinate, for example, parallel SQL
and parallel propagation or parallel recovery at the same time.
See Oracle8 Server Replication.for information about parallel propagation.
See “Performing Recovery in Parallel” on page 27-12 for information about
parallel recovery. Also see the Oracle8 Server Backup and Recovery Guide.
Parallel Execution 21-41
21-42 Oracle8 Server Concepts
P A R T
VII Data Protection
Part VII describes how Oracle protects the data in a database and explains what the database administrator can do to provide additional protection for data.
Part VII contains the following chapters:
•
Chapter 22, “Data Concurrency and Consistency”
•
Chapter 23, “Data Integrity”
•
Chapter 24, “Controlling Database Access”
•
Chapter 25, “Privileges and Roles”
•
Chapter 26, “Auditing”
•
Chapter 27, “Database Recovery”
Part VII Data Protection
Oracle8 Server Concepts
C H A P T E R
22 Data Concurrency and
Consistency
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.
Ralph Waldo Emerson
This chapter explains how Oracle maintains consistent data in a multiuser
database environment. The chapter includes:
•
Data Concurrency and Consistency in a Multiuser Environment
•
How Oracle Manages Data Concurrency and Consistency
•
How Oracle Locks Data
Data Concurrency and Consistency 22-1
Data Concurrency and Consistency in a Multiuser Environment In a single-user database, the user can modify data in the database without
concern for other users modifying the same data at the same time. However,
in a multiuser database, the statements within multiple simultaneous
transactions can update the same data. Transactions executing at the same
time need to produce meaningful and consistent results. Therefore, control of
data concurrency and data consistency is vital in a multiuser database.
•
Data concurrency means that many users can access data at the same
time.
•
Data consistency means that each user sees a consistent view of the data, including visible changes made by the user’s own transactions and
transactions of other users.
Data integrity, which enforces business rules associated with a database, is
discussed in Chapter 23, “Data Integrity”.
To describe consistent transaction behavior when transactions execute at the
same time, database researchers have defined a transaction isolation model