If you are having trouble getting your head around the basics of Oracles Architecture, this video does a good job of simplifying things and making it easy to remember by breaking it down and describing it via everyday examples. You can skip to around 2:30 for the real start of the video.
Datafiles – on disk
read to memory
data – buffer cache
sql goes to shared pool – library cache
executed sql goes to redo log buffer
Operations on the data always happen in memory. (database buffer)
Queries gets stored in the shared library
Subsequent queries (repeats) can be retrieved directly from the shared library and the buffer cache.
On entering data, process has to wait until data is written to datafile. This is inefficient as writing data out is slow.
Faster way is to use a scrap of paper to quickly jot it down then when have time write it to the ledger
So data goes to memory then the redo buffer then on a checkpoint, gets written to disk.
Once it is in the redo log, it is considered finished.
Before modifying data, the old values are recorded in the rollback segment
When a transaction is canceled, it is rolled back by retrieving the old values from the rollback segment and putting them back.
[embedplusvideo height=”328″ width=”584″ standard=”http://www.youtube.com/v/wmc9uxNW99E?fs=1″ vars=”ytid=wmc9uxNW99E&width=584&height=328&start=&stop=&rs=w&hd=0&autoplay=0&react=1&chapters=¬es=” id=”ep5503″ /]
Check out part 1 first.
Online Redo Logs
- Contains Redo and Undo info
- DDL – Create alter drop
- Need at least 2 files/groups
- Should be multiplexed each on different devices and controlers
- When each file fils, next one is started and old one is archived (if in Archivelogmode)
An Oracle database is comprised of datafiles, control files
and redo logs.
The second part is the memory – the SGA (system global area
or shared global memory)
Database Buffer Cache
Comprised of Oracle data blocks
There are 4 main types of data blocks, which are the same as the 4 types of data mentioned earlier: