Writing an article is mainly inspired by two books to write some personal notes, share knowledge, and recommend books to everyone read 1, "Harvest, not only Oracle" 2, "Oracle Kernel technology" does not involve programming, design architecture ideas, if there is a programming book is better! There are official documents must read, the English level is poor reading translation also must read again, the real authority originates from the official. I feel that when I get to know Oracle internal, as much as possible to look at the problem as a designer, if you can write C in the bottom process is more.
We say together, then the database is divided into instance and databases, we know that user access must pass through an instance to access the database, which is a hard rule. What are the instances and the database, and the user access to the PGA, and what is this, let's take a look at
PGA, when our request through the socket (in fact, also divided into many kinds of processing, do not want to elaborate) our instructions will be first to the PGA area is the program Global area, which will save the session properties, storage bound variables and so on is our user connection information, Then the user process and the database to establish a session, the system will identify the user-related permissions, save in this area, the PGA has processes called the server process to complete the work, but also private is not shared!
Sga,system Global area, shared memory region, Instance is actually sga+process (backstage), the SGA has a lot of plates, I think the relative shared_pool,database buffer Cache,redo Log buffer is relatively important, because each component is important, here is only relative concept, the SGA also contains Java Pool,large_pool, and so on, our simple query statement that the SELECT * from T to say how he process.
Shared_pool shared pool, this is actually very useful, when we access to the instance from the PGA to the SGA, then the PGA will generate a unique identity hash, this time will be in the SGA shared pool looking for a unique identity, If the found hash will be from the corresponding data cache buffer to find the corresponding values, the values directly back to the user, if not found on the more trouble, he will show whether the syntax is wrong, the rights are correct, parsing in what way to query, will first estimate cost costs, Compare the cost to choose a lower way to query, then in front of the action is completed will generate a unique hash value stored in the shared pool, and then go to the data cache buffer query.
Data buffer cache inside will look for the data we want, the SGA is in memory open space, at this time no we can only go to the database to achieve completion, query disk data files found on the find is not good, must take the results back to the user, then a query statement is roughly complete.
Say again the process inside the instance, we are under Linux, ps aux | grep Oracle will find a lot of background processes, I say a few inside the main processes and functions, pmon,smon,lckn,reco,ckpt,arch, including DBWR,LGWR, we understand these words English English! Very important, basically is the English translation come over the literal meaning, below we all go to say, know how to work, responsible for what work, focus on redo log and arch log function!
The draft is 2 months old. The Oracle system will be available to update research
World Oracle System (unfinished)