Professional Documents
Culture Documents
• Multiple instances
accessing the same
database Interconnect
• One Instance
per node
• Physical or Shared
logical access cache
to each
database file
• Software-controlled Instances
spread
data access
across nodes
Database
files
RAC Architecture
public network
VIP1 VIPn
Service Service Node n
Node1
Listener Listener
instance 1 instance n
ASM ASM
cluster
Oracle Clusterware interconnect Oracle Clusterware
shared storage
Redo / Archive logs all instances
Managed by ASM
Database / Control files
Cluster
Node1 Noden
Instance1 Instancen
GRD Master Cache GRD Master Cache
… Global …
LMON GES resources GES LMON
LMD0 LMD0
LMSx GCS GCS LMSx
LCK0 Interconnect LCK0
DIAG DIAG
Cluster
Node1 Noden
Instance1 Instancen
Cache Cache
… Global …
LMON resources LMON
LMD0 LMD0
LMSx LMSx
LCK0 LCK0
DIAG DIAG
Node1 Noden
…
Instance1 Instancen
Archived Archived
log files log files
Local storage Local storage
Data files
Undo tablespace Undo tablespace
files for Temp files files for
instance1 Control files instancen
Flash recovery area files
Online Change tracking file Online
redo log files SPFILE redo log files
for instance1 TDE Wallet for instancen
Shared storage
Automatic Storage Management
Shared
Memory
storage
• Highest Availability
• On-demand flexible
scalability Database
• Lower computing costs
• World record
performance
Storage
Levels of Scalability
Original system
Hardware Time Up to
200% Hardware
of Up to
100%
task 300%
Hardware of task
Time of
Hardware
task Time/2
Hardware
Time
Speedup/Scaleup and Workloads
HBA1
HBA2
HBA1
HBA2
HBA1
HBA2
CPU
HBA (Host Bus Adapter)
NICs and Interconnect Protocol
Switch speed
FC-Switch1 FC-Switch2 Controllers
Disks
Interconnect
Minimum number of
disks = number of
* 2Gbit based controller x 4
I/O Design
• Interconnect Design
• In DW environment primary users of interconnect
• Inter-node Parallel Query
• Typical message size
• PARALLEL_EXECUTION_MESSAGE_SIZE default 2k
Queries
Aggregations ETL1 Backu
p
ETL2
How to define a service
• 1. SRVCTL
srvctl add service –d ORA –s APP1 –r INSTANCE1,INSTANCE2
srvctl add service –d ORA –s APP2 –r INSTANCE3,INSTANCE4
(db) (service) (preferred instances)
• 2. Using OEM Grid Control
• 3. DBMS_SERVICE (for single instance)
DBMS_SERVICE.CREATE_SERVICE
Partitioning
Range Partitioning
Hash Partitioning
List Partitioning
Composite Partitioning
• Composite Range-Range Partitioning
Composite Range-Hash Partitioning
Composite Range-List Partitioning
Composite List-Range Partitioning
Composite List-Hash Partitioning
Composite List-List Partitioning
Query Performance:
Partition Pruning
05-Jan
Only the relevant partitions are
05-Feb accessed
05-Mar select sum(sales_amount)
from sales
where sales_date between
05-Apr
to_date(‘01-MAR-2005’,‘DD-MON-YYYY’)
and
05-May to_date(‘31-MAY-2005’,’DD-MON-YYYY’)
05-Jun
Sales
Partition-wise Joins
Sub-3 Sub-3
Sub-3 Sub-3 Node 3
Partial Partition-wise Joins
Partial Partition-wise join: If Lineitem is partitioned by
the join key, then Orders can be re-distributed to
enable partition-wise join
Lineitem Orders Lineitem Orders
Sub-1 Sub-1
Sub-1 Node 1
Sub-3
Sub-3 Sub-3 Node 3
What is Parallelism
SALES
Parallel
Execution Servers
Parallel Operations
Execution Servers
Consumers Producers
SQL Data Table on disk
sort A-K scan
dispatching
sort L-S scan
results
Coordinator sort T-Z scan
Table’s
dynamic
Intra-Parallelism Intra-Parallelism partitioning
DOP=3 (granules)
Inter-Parallelism
How Parallel Execution
Servers Communicate
• Rows Distribution:
• PARTITION QC
• HASH
• RANGE Parallel
• ROUND-ROBIN Execution
• BROADCAST Server Set 1
• QC(ORDER)
• QC(RANDOM) Parallel
Execution
Server Set 2
DOP=3
Degree of Parallelism (DOP)
Execution
coordinator
Node 2
3rd and 4th user logs on
Node 1
issues a query -> parallel 4
Inter-node Parallel Query– Oracle10g
Receive Receive
Hash Hash
DFO DFO
Send Send
Table Table
Scan Scan
Parallel Hash-Join with 8 Slaves
Node 1 Node 2
DFO
Hash Join
Receive
Set
DFO
DFO Shared Bloom filter Send
Send
Scan Dept
Scan Dept
11gR1: Extended to Serial Execution
View
Filter Create
Set
Group By
Local Bloom filter
Filter Use
Test
Scan Dept
Scan Emp
Parallel Execution on RAC
Answer : It depends….
Few Large Nodes
or
?
Manageability