Oracle 数据库体系结构介绍 Jametong@ dba 童家旺
主题列表 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
如何构建客户端连接 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
Oracle 如何执行 Select 语句 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 客户端提交 SQL SQL 解析 验证 SQL 语句的语法 通过数据字典验证表与字段的定义  取得相应对象的锁 , 确保解析过程 中对象不会发生变更 检查相应对象的访问权限 决定最佳的执行计划 将其保存到 SQL 共享池 SQL 执行 数据提取
优化—降低提交到 Oracle 的 SQL 数 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 客户端提交 SQL 使用 Oracle 11g 引入的 Client Result Cache 来提高其性能 使用 MemCached 来缓存结果集 ( 推荐 )
优化—正式解析前 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 SQL 解析 验证 SQL 语句的语法 通过使用客户端的 Statement Cache 来缓存解析后的游标 通过使用绑定变量来降低解析次数 通过使用 Oracle 内部 Session_cached_cursors 来缓存客户端的游标
优化 - 语义检查阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 通过数据字典验证表与字段的定义  取得相应对象的锁 , 确保解析过程 中对象不会发生变更 检查相应对象的访问权限 使用 Dictionary Cache 来缓存这部分信息 , 以提高查询的效率
优化 - 生成执行计划阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 决定最佳的执行计划 使用 Dictionary Cache 来缓存对象统计信息 , 以提高查询的效率 通过使用绑定变量来降低解析次数 缓存解析后的执行计划 使用 SQL Profiles/SPM/Hint 来指定如何生成执行计划
优化 - 提取阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 数据提取 由 Server Process 读取数据块进入 Buffer Cache. 再将符合条件的记录返回给客户端程序
Oracle 如何执行 DML 语句 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
执行 DML 的基本步骤 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 先按照基本的 SQL 执行步骤执行 事务开始 , 分配事务槽 更新数据 生成 Undo 块的 Redo 信息 更新 Undo 数据块 生成数据块的 Undo 信息 更新数据块 在满足 LGWR 相关条件的情况下 Flush Redo Buffer
LGWR Flush 的相关条件 When the Redo log buffer is 1/3 filled.  1MB Data in the log buffer When the timeout occurs (for every 3 seconds)  Before the DBWR writes the dirty blocks to the database files (DBFs).  When a transaction commits.  Checkpoint
DBWR  写数据文件的相关条件 The Number of dirty buffers reaches to a threshold value.  When a process scans a specified number of blocks when scanning for the free buffers and can't find any.  When timeout occurs (for every 3 seconds).  When a checkpoint occurs.
CKPT  的分类 Full Checkpoint Thread Checkpoint File Checkpoint Object checkpoint Parallel Query Checkpoint Incremental Checkpoint Log Switch Checkpoint
Full Checkpoint Writes block images to the database for all dirty buffers from all instances Statistics updated: DBWR checkpoints DBWR checkpoint buffers written DBWR thread checkpoint buffers written Caused by: Alter system checkpoint [global] Alter database begin backup Alter database close Shutdown Controlfile and datafile headers are updated CHECKPOINT_CHANGE#
Incremental Checkpoint Writes the contents of some dirty buffers to the database from CKPT-Q Block images written in SCN order Checkpoint RBA updated in SGA Statistics updated: DBWR checkpoint buffers written Controlfile is updated every 3 seconds by CKPT Checkpoint progress record
其他 checkpoint 类型介绍 File Checkpoint Alter tablespace XXX offline Alter tablespace XXX begin backup Alter tablespace XXX read only Parallel Query Checkpoint Parallel Query Parallel Query component of PDML or PDDL Object “Checkpoint” Drop table XXX Drop table XXX purge Truncate table XXX Drop index XXX
Smon Jobs 在 Instance Recovery 的时候 回滚任何未回滚的事务 释放任何未释放的锁 在字典管理表空间的情况下 , 合并相邻的空闲空间 释放系统内的临时对象 (ctas/create index/index rebuild/index rebuild online)
Pmon Jobs Rolling back the disconnected user process's transactions.  Releasing any locks those are acquired by the disconnected user process.  Freeing all the resources used by the disconnected user process

More Related Content

PPT
山頂洞人日記 - 回歸到最純樸的開發
PPTX
7, OCP - configure database for backup and recovery
PDF
Kid171 chap03 traditional Chinese Version
PPT
数据库性能诊断的七种武器
PDF
Spark sql培训
PDF
Oracle 索引介紹
PPTX
Nhibernate+sqlite測試實戰經驗分享
PPT
数据库性能模型与容量规划
山頂洞人日記 - 回歸到最純樸的開發
7, OCP - configure database for backup and recovery
Kid171 chap03 traditional Chinese Version
数据库性能诊断的七种武器
Spark sql培训
Oracle 索引介紹
Nhibernate+sqlite測試實戰經驗分享
数据库性能模型与容量规划

What's hot (20)

PDF
配置Oracle 10g 双向流复制
PDF
Chapter 4 models
PPT
Performance Data Analyze
PDF
美团数据库运维平台介绍
PDF
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
PDF
Oracle 資料庫建立
PPT
My sql管理基础 李春_v2
PPTX
SQL Server效能調校
PPTX
Spark性能调优分享
PDF
Oracle Instance 介紹
PDF
诗檀软件 Oracle开发优化基础
PDF
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
PPT
Mr&ueh数据库方面
PDF
Oracle 資料庫檔案介紹
PPTX
Spark streaming经验介绍
PPTX
使用 Liquibase 發展資料庫結構
PPTX
开源应用日志收集系统
PPTX
分布式系统日志处理调研
PPTX
Elastic stack day-1
PPTX
3, OCP - instance management
配置Oracle 10g 双向流复制
Chapter 4 models
Performance Data Analyze
美团数据库运维平台介绍
诗檀软件 – Oracle数据库修复专家 oracle数据块损坏知识2014-10-24
Oracle 資料庫建立
My sql管理基础 李春_v2
SQL Server效能調校
Spark性能调优分享
Oracle Instance 介紹
诗檀软件 Oracle开发优化基础
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
Mr&ueh数据库方面
Oracle 資料庫檔案介紹
Spark streaming经验介绍
使用 Liquibase 發展資料庫結構
开源应用日志收集系统
分布式系统日志处理调研
Elastic stack day-1
3, OCP - instance management
Ad

Similar to Oracle数据库体系结构简介.ppt (20)

PPT
Oracle北大青鸟完全教程
PDF
Oracle数据库升级前必要的准备工作
PPT
腾讯大讲堂48 数据库查询优化浅析
PDF
资身Dba经验谈
PPT
Altibase管理培训 优化篇 v1.1
PPTX
开源应用日志收集系统
PPT
網站設計100步
PDF
Itpub电子杂志(第五期)
PPTX
1, OCP - architecture intro
PPT
Basic oracle for developer&beginner
PPT
Essential oracle security internal for dba
PPT
Times Ten Training
PPTX
11, OCP - awr & alert system
PDF
P6 数据库安装和配置
PDF
A.oracle 查询结果的缓存问题
PDF
一次Web性能测试小结
PDF
基于J2 Ee 的通用Web 信息系统框架设计与实现
PDF
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
PDF
Csdn Emag(Oracle)第二期
PDF
Build 1 trillion warehouse based on carbon data
Oracle北大青鸟完全教程
Oracle数据库升级前必要的准备工作
腾讯大讲堂48 数据库查询优化浅析
资身Dba经验谈
Altibase管理培训 优化篇 v1.1
开源应用日志收集系统
網站設計100步
Itpub电子杂志(第五期)
1, OCP - architecture intro
Basic oracle for developer&beginner
Essential oracle security internal for dba
Times Ten Training
11, OCP - awr & alert system
P6 数据库安装和配置
A.oracle 查询结果的缓存问题
一次Web性能测试小结
基于J2 Ee 的通用Web 信息系统框架设计与实现
Orclrecove 1 pd-prm-dul testing for oracle database recovery_20141030_biot_wang
Csdn Emag(Oracle)第二期
Build 1 trillion warehouse based on carbon data
Ad

More from james tong (17)

PPTX
数据库系统设计漫谈
PDF
Migrating from MySQL to PostgreSQL
PPTX
Oracle 性能优化
PPTX
Cap 理论与实践
PDF
Scalable system operations presentation
PDF
Benchmarks, performance, scalability, and capacity what s behind the numbers...
PDF
Stability patterns presentation
PDF
The right read optimization is actually write optimization
PDF
My sql ssd-mysqluc-2012
PDF
Evaluating ha alternatives my sql tutorial2
PDF
Troubleshooting mysql-tutorial
PDF
Understanding performance through_measurement
PPTX
我对后端优化的一点想法 (2012)
PPT
设计可扩展的Oracle应用
PPTX
我对后端优化的一点想法.pptx
PPT
Enqueue Lock介绍.ppt
PPT
Cassandra简介.ppt
数据库系统设计漫谈
Migrating from MySQL to PostgreSQL
Oracle 性能优化
Cap 理论与实践
Scalable system operations presentation
Benchmarks, performance, scalability, and capacity what s behind the numbers...
Stability patterns presentation
The right read optimization is actually write optimization
My sql ssd-mysqluc-2012
Evaluating ha alternatives my sql tutorial2
Troubleshooting mysql-tutorial
Understanding performance through_measurement
我对后端优化的一点想法 (2012)
设计可扩展的Oracle应用
我对后端优化的一点想法.pptx
Enqueue Lock介绍.ppt
Cassandra简介.ppt

Oracle数据库体系结构简介.ppt

  • 2. 主题列表 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
  • 3. 如何构建客户端连接 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
  • 4. Oracle 如何执行 Select 语句 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 客户端提交 SQL SQL 解析 验证 SQL 语句的语法 通过数据字典验证表与字段的定义 取得相应对象的锁 , 确保解析过程 中对象不会发生变更 检查相应对象的访问权限 决定最佳的执行计划 将其保存到 SQL 共享池 SQL 执行 数据提取
  • 5. 优化—降低提交到 Oracle 的 SQL 数 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 客户端提交 SQL 使用 Oracle 11g 引入的 Client Result Cache 来提高其性能 使用 MemCached 来缓存结果集 ( 推荐 )
  • 6. 优化—正式解析前 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 SQL 解析 验证 SQL 语句的语法 通过使用客户端的 Statement Cache 来缓存解析后的游标 通过使用绑定变量来降低解析次数 通过使用 Oracle 内部 Session_cached_cursors 来缓存客户端的游标
  • 7. 优化 - 语义检查阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 通过数据字典验证表与字段的定义 取得相应对象的锁 , 确保解析过程 中对象不会发生变更 检查相应对象的访问权限 使用 Dictionary Cache 来缓存这部分信息 , 以提高查询的效率
  • 8. 优化 - 生成执行计划阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 决定最佳的执行计划 使用 Dictionary Cache 来缓存对象统计信息 , 以提高查询的效率 通过使用绑定变量来降低解析次数 缓存解析后的执行计划 使用 SQL Profiles/SPM/Hint 来指定如何生成执行计划
  • 9. 优化 - 提取阶段 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 数据提取 由 Server Process 读取数据块进入 Buffer Cache. 再将符合条件的记录返回给客户端程序
  • 10. Oracle 如何执行 DML 语句 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块
  • 11. 执行 DML 的基本步骤 程序如何连接 Oracle 基本连接结构图 Oracle 如何执行 Select 语句 客户端提交 SQL 解析 语法检查 语义检查 生成执行计划 执行 提取 Oracle 如何执行 DML 语句 分配事务槽 更新数据 更新 Undo 更新数据块 写日志 写数据块 先按照基本的 SQL 执行步骤执行 事务开始 , 分配事务槽 更新数据 生成 Undo 块的 Redo 信息 更新 Undo 数据块 生成数据块的 Undo 信息 更新数据块 在满足 LGWR 相关条件的情况下 Flush Redo Buffer
  • 12. LGWR Flush 的相关条件 When the Redo log buffer is 1/3 filled. 1MB Data in the log buffer When the timeout occurs (for every 3 seconds) Before the DBWR writes the dirty blocks to the database files (DBFs). When a transaction commits. Checkpoint
  • 13. DBWR 写数据文件的相关条件 The Number of dirty buffers reaches to a threshold value. When a process scans a specified number of blocks when scanning for the free buffers and can't find any. When timeout occurs (for every 3 seconds). When a checkpoint occurs.
  • 14. CKPT 的分类 Full Checkpoint Thread Checkpoint File Checkpoint Object checkpoint Parallel Query Checkpoint Incremental Checkpoint Log Switch Checkpoint
  • 15. Full Checkpoint Writes block images to the database for all dirty buffers from all instances Statistics updated: DBWR checkpoints DBWR checkpoint buffers written DBWR thread checkpoint buffers written Caused by: Alter system checkpoint [global] Alter database begin backup Alter database close Shutdown Controlfile and datafile headers are updated CHECKPOINT_CHANGE#
  • 16. Incremental Checkpoint Writes the contents of some dirty buffers to the database from CKPT-Q Block images written in SCN order Checkpoint RBA updated in SGA Statistics updated: DBWR checkpoint buffers written Controlfile is updated every 3 seconds by CKPT Checkpoint progress record
  • 17. 其他 checkpoint 类型介绍 File Checkpoint Alter tablespace XXX offline Alter tablespace XXX begin backup Alter tablespace XXX read only Parallel Query Checkpoint Parallel Query Parallel Query component of PDML or PDDL Object “Checkpoint” Drop table XXX Drop table XXX purge Truncate table XXX Drop index XXX
  • 18. Smon Jobs 在 Instance Recovery 的时候 回滚任何未回滚的事务 释放任何未释放的锁 在字典管理表空间的情况下 , 合并相邻的空闲空间 释放系统内的临时对象 (ctas/create index/index rebuild/index rebuild online)
  • 19. Pmon Jobs Rolling back the disconnected user process's transactions. Releasing any locks those are acquired by the disconnected user process. Freeing all the resources used by the disconnected user process

Editor's Notes

  • #4: 客户端发出请求 监听程序接受连接 监听程序转发请求 客户端通过 Dedicated Process 与 Oracle 进行通讯