腾讯大讲堂38 oracle基础体系结构及性能优化

13
Oracle 基基 基基基基基基基基 Tiger Qiu 基基基基基 – 基基基基基

Upload: areyouok

Post on 05-Dec-2014

2.698 views

Category:

Documents


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 腾讯大讲堂38 oracle基础体系结构及性能优化

Oracle 基础体系结构及性能优化

Tiger Qiu运营支持部 – 数据仓库组

Page 2: 腾讯大讲堂38 oracle基础体系结构及性能优化

About me

2007 年 7 月加入腾讯,现为运营支持系统运营支持部数据仓库组组长;从事 Oracle 相关的工作近 10 年;2003 年 9 月通过 Oracle Certified Master 认证;曾任职于 HP 全球服务中心和 Oracle 亚太区售前技术支持中心;

Page 3: 腾讯大讲堂38 oracle基础体系结构及性能优化

课程大纲Oracle 数据库中的基础对象常见的 Oracle 硬件架构腾讯数据仓库的架构Oracle 体系结构介绍Oracle 推荐的存储架构表分区技术Oracle 中的关联技术统计信息与执行计划分析演示性能监控与分析演示参考资料与导读

Page 4: 腾讯大讲堂38 oracle基础体系结构及性能优化

Oracle 数据库中的基础对象

Tablespace

Datafile

Tempfile

Segment

Extent

Page

Table

Index

Page 5: 腾讯大讲堂38 oracle基础体系结构及性能优化

常见的 Oracle 硬件架构

Page 6: 腾讯大讲堂38 oracle基础体系结构及性能优化

腾讯数据仓库的架构

172.16.61.17数据接口机

172.16.31.23数据接口机

172.23.20.121冷备主机

172.16.237.162冷备主机

cx300

龙岗IDC 沙河IDC

主节点

cx200 cx200

cx300cx300

172.23.20.163冷备主机

172.16.236.125冷备主机

cx300 cx300cx300

单周双次增量备份

容灾备份节点主数据仓库

接口机 冷备机

Page 7: 腾讯大讲堂38 oracle基础体系结构及性能优化

Oracle 体系结构介绍

Page 8: 腾讯大讲堂38 oracle基础体系结构及性能优化

Oracle 推荐的存储架构

Raid 5 Disk Group: Stripped among 6 disks with one hot spare disk.

Lun: Created based on raid 5 disk group

VPath: Balance IO workload among all HBAs

ASM Disk Group: Stripped among all LVs, in another word, it's stripped among all Luns.

…Raid 57+1

Raid 57+1

Raid 57+1

Raid 57+1

ASM Disk Group

Switch

Raid 57+1

Raid 57+1

Raid 57+1

Page 9: 腾讯大讲堂38 oracle基础体系结构及性能优化

表分区技术

分区的几种方法Range Partition/List Partition/Hash Partition

Range + Hash or List + Hash

查询中的分区裁剪Partition-Wise 关联

Page 10: 腾讯大讲堂38 oracle基础体系结构及性能优化

Oracle 中常用的三种关联方法

Nested Loop Join对相对较少的数据量进行操作,尤其是驱动表针对关联条件,嵌套表有高效的访问方法

Hash Join对大数据量进行关联驱动表的数据最好能够完全 LOAD进内存中

Sort-Merge Join关联数据已经是预排序的关联条件为非等值关联

Page 11: 腾讯大讲堂38 oracle基础体系结构及性能优化

统计信息收集与执行计划

90–9–1 定律统计信息收集方法对表和索引统计信息进行第一次收集系统在运行时将自动收集对表的使用情况和负载重新收集一次表和索引统计信息,系统将根据之前收集到的负载信息自动收集必须的统计信息如果统计信息仍不准确,可以手动进行收集校验统计信息准确性的方法

alter session set statistics_level = all

select * from table(dbms_xplan.display_cursor())

Optimizer Hint 及执行计划分析演示

Page 12: 腾讯大讲堂38 oracle基础体系结构及性能优化

性能监控与分析演示

Page 13: 腾讯大讲堂38 oracle基础体系结构及性能优化

参考资料与导读Useful Websites

asktom.oracle.commetalink.oracle.comwww.itpub.netwww.google.com

Books in Oracle Documentation LibraryOracle Data Warehousing GuideOracle Performance Tuning GuideOracle Administrator's GuideOracle SQL ReferenceOracle Reference