Reading summary: Oracle Software Structure

xiaoxiao2021-03-06  68

Oracle Database Server is mainly composed of two parts: databases and instances.

Examples. Memory structure of instances: SGA (System Global AREAS) and PGA (Program Global Areas). Process Structure of Example: Service Process and Background Process

Memory structure: SGA (system global areas) 1, the database cache buffer pool buffer_pool_keep .recycle db_cach_size .keep buffer_pool_recycle .default buffer pool buffer pool db_cache_size- (buffer_pool_keey buffer_pool_recycle) 2, redo log buffer log_buffer3, shared pool library cache shared_pool_size: with SQL and PL / SQL program code that has been parsed and executed. Enjoy SQL Workspace: The syntax analysis result and execution plan stored with SQL statements. If the shared SQL workspace has no free space, Oracle will use the LRU algorithm to replace the SQL statement that has recently been used recently ----> SGA. There is a SQL workspace: another part of the SQL statement is saved to private SQL workspace In, including information such as bind variables, environment and session parameters, including the SQL statement, which is privately available, and other users cannot use this information even if the same SQL statement is performed. The private SQL workspace will only be created in the SGA when the Shared Server (Servers = Shared) is created. In general, private SQL workspaces are located in PGA. # The size of the library cache is closely related to Open_CURSORS. The Open_CURSORS parameter is used to specify the number of cursors that can open at the same time in the database, and each query statement requires a cursor. Database Dictionary Cache: This is a "row cache", which is saved in it, and is not saved by other caches. 4, Java Pool 5, Large Pool Large_Pool_Size. Perform a database backup and recovery operation. Perform a SQL statement with a large number of sorting operations. Recruitment of database operation # If you do not create large pools in the SGA area, the above-mentioned operations required Cache space required Will allocate in a shared or PGA. PGA (Program Global Co.) saves the data of the service process and the memory structure of the control information. This memory structure is not shared, and only the service process itself can access its own PGA zone. Each service process has its own PGA zone, the sum of the sum of each service process PGA is the size of the PGA area of ​​the instance. 1. Private SQL Workspace When performing complicated queries (such as query statements in the decision support system), you often need to create a relatively large dynamic cache in the PGA, which is used to specifically perform some of the following must be carried out in memory. Operation:. Sort (ORDER BY, Group BY) Sort_area_sizesort_area_retained_size. Connection (INNER JOIN) Hash_area_size. Collection Operation (Union, InterSet, Minus) Create_bitmap_Area_Size

# Servers = Dedicated private SQL workspace will save in the PGA in the service process # Servers = Shared private SQL workspace will be saved in the SGA area

2. Session memory area is used to save the variable of the user session (login information) and other related information related information # servers = dedicated session memory area will be saved in the PGA of the dedicated service process for this session. At this time, only this service process needs to use the session information of the session. # Servers = Shared session memory area is located in the SGA area instead of the PGA area because session information is used by all shared service processes.

Workarea_size_policy = autopga_aggregate_target = xxx process structure

Service Process: 1. Private Service Process: A dedicated service process can only provide services for one user 2, shared service process: a shared service process can provide services for multiple users. Resolution and execute the SQL statement submitted by the user. The data accessed by the user process in the database cache in the SGA area. If the data is not in the cache, you need to read the required data from the hard disk data file, and copy them into the cache. Return the data to the user process.

The background process dbwndb_writer_processes. When the user performs INSERT or UPDATE, the inserted data is first written to the database cache. In this process, if Oracle searches for a certain amount of data (DB_BLOCK_MAX_SCAN) in the database buffer LRU list, the DBWR process will start, and the DBWR process writes the dirty block. After the file, the database cache will get more idle cache blocks. When the checkpoint occurs, the DWBR process will be started. When the length of the database cache LRU list reaches half of the DB_BLOCK_WRITE_BATCH specified value, the DBWR process will start. The DBWR process is started if timeout (not started within approximately 3 seconds). LGWR. Use the commit statement to submit the current transaction. Redo the log cache write a bit of one-third. The DBWR process starts writing the dirty cache block to the data file. If timeout (about 3 seconds), it will start LGWRCKPTLOG_CHECKPOINT_TIMEOMETLOG_CHECKPOINT_INTERVALLOG_CHECKPOINT_TO_ALERT

SMONPMONARCNARCHIVE_LOG_START

Reocnnn

转载请注明原文地址:https://www.9cbs.com/read-89731.html

New Post(0)