Database Reference
In-Depth Information
Chapter 6
Application Design Issues
by Riyaj Shamsudeen
Inefficient application design strategy is the root cause of many customer RAC escalations.
Bad design practices causing minor performance issues in a single-instance database are magnified if you
convert the database to a RAC database. Failures and cost overruns in many RAC deployment projects can be
attributed to application design patterns that are not suitable for RAC. These design flaws are detrimental in
single-instance databases, but the harm might be amplified in RAC. For example, poor design of sequence caching
will cause only minor performance issues in a single-instance database; however, in a RAC database, that flaw can
lead to a completely hung cluster.
In this chapter, I will discuss these design patterns, methods to troubleshoot these issues, and possible strategies
for resolving them.
Localized Inserts
Excessive insert concurrency is one of the most common issues faced in a RAC database. Although too much
concurrency itself is not an issue, either a flaw in an object design or an invalid use of application affinity can trigger
massive performance issues.
In a B-Tree index, values are stored in ascending or descending order of indexed columns. Consider a unique
index of the employee_id column in the employee table, populated by an emp_id_seq sequence with a current value
of 1,000. An insert into the employee table using that sequence-generated value will store an entry in the rightmost
leaf block of the index tree because 1,000 is the current maximum value. Subsequent inserts retrieving values from
the emp_id_seq sequence will also populate entries in that leaf block until the leaf block is full. After the leaf block
is full, a new block will be added to the index tree and subsequent inserts will populate index entries in the newly
added leaf block. Essentially, new inserts into the employee table will populate index entries in the current rightmost
leaf block of the index tree. In Figure 6-1 , recently inserted values (1,000 to 1,003) are populated in the rightmost leaf
block of the index tree. 1
1 Note that Figure 6-1 shows only four rows in the leaf block. Usually, hundreds of row entries will exist in a leaf block.
 
Search WWH ::




Custom Search