上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 117 下一页

2009年12月2日

Full Hint

摘要: FULL Hint可以提升优化器对指定表走全表扫描,但是FULL提示一次只能对一个表起作用 SQL> select ename,dept.deptno from emp,dept where emp.deptno=dept.deptno; 已选择14行。 执行计划----------------... 阅读全文

posted @ 2009-12-02 17:00 如果蜗牛有爱情 阅读(121) 评论(0) 推荐(0) 编辑

将索引移动到别的表空间

摘要: 最开始以为index也可以使用move命令来移动表空间,结果想法错了 alter index index_name rebuild tablespace tablespace_name online nologging parallel; SQL> select segment_name,segm... 阅读全文

posted @ 2009-12-02 15:54 如果蜗牛有爱情 阅读(122) 评论(0) 推荐(0) 编辑

2009年12月1日

USE_HASH

摘要: use_hash(table1,table2) 指定table1,table2连接以HASH 方式连接,采用这种方式,我们不能控制table1,table2哪个表为驱动表, 优化器会根据cost自动选择驱动表,如果我们非要控制table1为驱动表,可以加上leading(table1)作为提示,或... 阅读全文

posted @ 2009-12-01 16:29 如果蜗牛有爱情 阅读(554) 评论(0) 推荐(0) 编辑

USE_NL

摘要: use_nl (table1,table2....) 提示指示指定表作为inner table,如果指定的表已经作为了outer table(驱动表),那么优化器会忽略 use_nl 提示,如果非要强制它作为inner table ,可以与ordered 提示一起使用。 下面以SCOTT测试用户作... 阅读全文

posted @ 2009-12-01 15:16 如果蜗牛有爱情 阅读(228) 评论(0) 推荐(0) 编辑

驱动表

摘要: 驱动表(driving table/outer table)又称为外层表,驱动表仅仅用于nested loops join 和 hash join 驱动表是用来驱动查询的 在cbo中,优化器会根据cost自动选择驱动表,与表的顺序无关。 通常情况下,驱动表的选择性较高(该列唯一键与列的比值较高),... 阅读全文

posted @ 2009-12-01 10:33 如果蜗牛有爱情 阅读(198) 评论(0) 推荐(0) 编辑

2009年11月30日

使用ASH监控历史会话,找出坏SQL

摘要: 使用如下脚本可以监控历史会话经历过哪些等待事件,并且按照等待次数降序排列 select session_id,event,count(*),sum(time_waited) from v$active_session_history where session_state='WAITING' a... 阅读全文

posted @ 2009-11-30 17:08 如果蜗牛有爱情 阅读(115) 评论(0) 推荐(0) 编辑

log file sync, log file parallell write

摘要: SQL> select name,parameter1,parameter2,parameter3,wait_class from v$event_name where name in( 'log file sync','log file parallel write'); NAME ... 阅读全文

posted @ 2009-11-30 13:42 如果蜗牛有爱情 阅读(197) 评论(0) 推荐(0) 编辑

log file switch completion,log file switch(checkpoint incomplete),log file switch(archiving needed)

摘要: log file switch completion,log file switch (archiving needed) log file switch (checkpoint incomplete) 这三个等待事件是没有参数的,在10g中,它位于configuration类下 SQL> se... 阅读全文

posted @ 2009-11-30 11:24 如果蜗牛有爱情 阅读(289) 评论(0) 推荐(0) 编辑

2009年11月28日

关于latch的一点点理解

摘要: latch是ORACLE中锁的一种,它是一种低级锁,是保护SGA中的共享内存,它几乎不排队(latches wait list除外),不会产生死锁。 latch分为no-wait与willing-to-wait模式,以willing-to-wait请求的latch只有少数几个,而... 阅读全文

posted @ 2009-11-28 23:01 如果蜗牛有爱情 阅读(242) 评论(0) 推荐(0) 编辑

2009年11月27日

使用并行查询模拟direct path read等待事件

摘要: 上次做了一个磁盘排序引起的direct path read等待事件,这次做个并行查询引起的等待事件 SQL> select * from v$version; BANNER--------------------------------------------------------------... 阅读全文

posted @ 2009-11-27 14:51 如果蜗牛有爱情 阅读(179) 评论(0) 推荐(0) 编辑

上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 117 下一页

导航