内容概要
1. oracle的核心组件
2. 内部主要的运行流程
3. 常用的Debug工具(时间、影响)
Oracle结构图
Password
file
Instance
SGA
Redo LogBuffer
Shared Pool
Data DictionaryCache
Library
Cache
DBWR
SMON
PMON
CKPT
LGWR
Others
Userprocess
Serverprocess
PGA
Control files
Data
files
Database
DatabaseBuffer Cache
Redo Log files
Java Pool
Large Pool
Parameter
file
Archived
Log files
OS
Net
DISK
RAM
Shared Pool
存些什么:
–最近经常使用的SQL语句
–最近经常使用的数据定义
结构:
–库告诉缓存
–数据字典高速缓存
Library Cache
• Stores information about the most recently used
SQL and PL/SQL statements
• Enables the sharing monly used statements
• Is managed by a least recently used (LRU) algorithm
• Consists of two structures:
– Shared SQL area
– Shared PL/SQL area
• Size determined by the Shared Pool sizing
Data Dictionary Cache
A collection of the most recently used definitions in the database
Includes information about database files, tables,indexes, columns, users, privileges, and other database objects
Caching data dictionary information into memory improves response time on queries and DML
Sql语句的执行过程
SQL语句有哪些?
查询语句处理
DML语句处理(insert, update, delete)
DDL 语句处理(create .. , drop .. , alter .. , )
SQl语句执行过程: parse-->execute-->fetch
具体些:
Sqlasciihashsoft parseexecute
hard parse…….
再具体些:
soft parse 可以直接使用其对应的执行计划对数据进行存取
hard parse先会查找shared pool的空间是否足够,如果不够,利用LRU算法将最近最不常使用的sql换出内存中,在进行相应的转换。
硬解析执行语法分析(很占资源)
,验证它是合法的语句,即书写正确
,以验证是否符合表和列的定义
,使得在语句的语法分析过程中不改变这些对象的定义
变量绑定可以消除以上这些过程!
Database Buffer Cache
• Stores copies of data blocks that have been retrieved from the data files
• Enables great performance gains when you obtain and update data
• Managed through an LRU algorithm
两个链表
LRU LRU---------------MRU
Dirty List 数据文件中所对应的块与在写链表里面对应的块的内容是不一致的
Redo Log Buffer
• Records all changes made to the database data blocks
• Primary purpose is recovery
• Changes recorded within are called redo entries
• Redo
oracle介绍 来自淘豆网www.taodocs.com转载请标明出处.