Oracle Scratchpad

Oracle Mechanisms

Back to main Tutorial Page

Oracle Mechanisms – Agenda

This course is new for 2013 and is, in effect, a walk through the book Oracle Core. The two day event covers the core mechanisms of how the central portion of the basic database engine works. There are eight chapters in the book, which are reflected in the eight topic headings listed below; and the material presented in the course of the two days will follow this pattern.

Unlike previous courses, however,  which had a fixed timetable and were strictly set to four sessions of equal length each day, this course will have a flexible timetable where the number and duration of pauses will depend on the amount of interaction from the attendees. There will, however, be a lunch break in the middle of the day, and at least one break mid-morning and another mid-afternoon. Throughout the sessions we will always try to focus on the questions – how does knowing this information help me either make the application more efficient, or reduce the amount of maintenance work I need to do.

Topic 1

Overview.
A brief introduction to the principal files used in an Oracle database, the key processes and what they do with those file, and the way that Oracle uses memory.

 
Topic 2

Redo and Undo
The mechanisms that Oracle uses to change data, and reverse out change. Redo change vectors and undo records. How the redo and undo mechanisms allow Oracle to increase scalability and reduce blocking. Why we have redo log files but undo tablespaces. The three functions of undo.

 
Topic 3

Transactions and Consistency
Why writers don’t block readers. Internals of the Undo Segment – undo segment headers and the transaction table. Chaining undo records in undo blocks. Data segment headers and the Interested Transaction List. Commits and the options for cleanout. Two forms of Oracle error ORA-01555. The special handling for LOBs.

 
Topic 4

Latches Mutexes and Locks
Why locks are different from latches and mutexes. Methods of using memory: arrays, pointers, hash tables and linked lists. Shared memory and the threat of lost updates. How latches and mutexes protect memory locations from concurrent overwrites. An example of the interaction of latches hash tables, and linked lists – the library cache. Locks as mechanisms for sharing and queueing. How queueing mechanisms lead to deadlocks. Internal structures used for locks. Some common lock types. A graphic explanation of v$lock. How Oracle also uses locks in the library cache.

 
Topic 5

The Buffer Cache
Layers of memory structures. Granules and buffer pools, buffers and buffer headers. Working data sets and the database writer(s). Buffer re-use and the LRU/Touch Count algorithm. Finding the right buffer – the cache buffers chains. Latching and pinning to protect shared memory. Reading data blocks into the buffer, and the creation and use of read consistent copies of blocks..

 
Topic 6

Writing and Recovery
The main write I/O activity. How DBWR and LGWR work individually, and how they co-operate. The various types of checkpoints and how they anticipate recovery scenarios and minimize the work needed to recover. Ancillary I/O activity – archiving, flashback logging, and change tracking – and how the range of recovery options affects the ongoing I/O load.

 
Topic 7

Parsing and Optimising
Note particularly that this chapter is not about the arithmetic of the cost-based optimizer, it is about the various structures in the shared memory that are manipulated due to a parse call. How much does Oracle need to know to “understand” an SQL statement, and how is this information handled.
What does the shared pool look like, and how does Oracle deal with loading and accessing all the pieces of information it needs to parse and optimize a statement. We start with memory granules to build the shared pool then consider the finer levels of granularity – the sub-pools and “durations”.
How does the dictionary cache work, how does the library cache work – and what is a cursor. What is the difference between a parent cursor and a child cursor. What is the difference between an “open” cursor, and a “pinned” cursor.

 
Topic 8

RAC and Ruin
A very brief look at how Oracle addresses the issues raised when multiple machines are all trying to share the same database. How can we share objects safely when the “shared memory” is distributed across several machines. The global resource directory; master resources and shadow resources and their role in crash recovery. A couple of special cases to consider when designing for RAC.

 

Back to main Tutorial Page

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 3,530 other followers