我的甲骨文世界

欢迎来到我的甲骨文世界>>   | 首页 资源中心 | 故障排除 | Unix | SQL优化 | 等待优化 | Internal | Net8 | 对象管理 | 空间管理 | 备份&恢复 | 用户管理 | ITPUB论坛

使用dbms_xplan工具查看执行计划

发表人:xiaoxiongg | 发表时间: 2005年五月27日, 19:46

9i有一个新的包 dbms_xplan,对查询plan_table表是一个很有用的工具,相对于以前写一个复杂的SQL语句,然后从plan_table看执行计划,不如调用 dbms_xplan 包,还可以显示格式,这个工具的使用也非常方便。
调用的语法类似

 查看全文

如何判断SQL没有使用绑定变量?

发表人:xiaoxiongg | 发表时间: 2005年五月27日, 19:46

这是ITPUB上的帖子:
http://www.itpub.net/335137.html

1. Jametong
减产前40个字符相同, 有多于5个不同sql版本的sql语句^_^

select substr(sqltext,1,40) sql_text,count(*)
from v$sql
group by substr(sqltext,1,40)
having count(*) >= 5;

 查看全文

如何收集sql跟踪信息

发表人:xiaoxiongg | 发表时间: 2005年五月21日, 19:50


在诊断数据库系统性能的过程中,总会涉及到跟踪效率低下的sql语句,现在就如何跟踪sql语句来做一个简单的总结。权做抛砖引玉之用。 查看全文

测试SQL语句的执行效率

发表人:xiaoxiongg | 发表时间: 2005年四月20日, 18:23

三种方法:TKPROF, Explain Plans, and AUTOTRACE

 查看全文

How to improve performance for predicate like '%search words%' on large tables?

发表人:xiaoxiongg | 发表时间: 2005年三月29日, 19:50


Like keyword will disable using index when placing a '%' in search words, even there is an index on search column. So we may try other way to improve the performance. Here, what we will do is to setup an "index". Note the quote on index, actually it is not a real index, instead it is a table which contains two columns, one is a column I'll blind search on, the other is rowid related with the 1st column, both are from the original table. Let's see how we do. 查看全文

使用绑定提高动态 SQL 性能

发表人:xiaoxiongg | 发表时间: 2005年三月16日, 19:50

由于几个方面的原因,开发人员通常会选择不在 PL/SQL 中使用动态 SQL。一个方面的原因是这样做有风险,因为 SQL 语句到运行时期才解析,所以捕获简单语法错误的难度会更大。此外,很多动态 SQL 的尝试都会带来性能问题,简单编写动态 SQL 的复杂性对动态 SQL 也有负面的影响。 查看全文

statspack的若干使用技巧(转至xzh2000的博客)

发表人:xiaoxiongg | 发表时间: 2005年三月15日, 18:20

1 如何修改statspack的脚本产生自定义报表?
2 如何用statspack的报表确定热表及索引?
3 如何用statspack的报表确定keep池与default池的分配?
4 如何用crontab定期产生statspack的报表?

 查看全文

QA--性能调整

发表人:xiaoxiongg | 发表时间: 2004年十月24日, 09:01


[Q]如果设置自动跟踪
[A]用system登录
执行$ORACLE_HOME/rdbms/admin/utlxplan.sql创建计划表
执行$ORACLE_HOME/sqlplus/admin/plustrce.sql创建plustrace角色
如果想计划表让每个用户都能使用,则
SQL>create public synonym plan_table for plan_table;
SQL> grant all on plan_table to public;
如果想让自动跟踪的角色让每个用户都能使用,则
SQL> grant plustrace to public;
通过如下语句开启/停止跟踪
SET AUTOTRACE ON |OFF
| ON EXPLAIN | ON STATISTICS | TRACEONLY | TRACEONLY EXPLAIN 查看全文

QA--性能调整

发表人:xiaoxiongg | 发表时间: 2004年十月24日, 09:01


[Q]如果设置自动跟踪
[A]用system登录
执行$ORACLE_HOME/rdbms/admin/utlxplan.sql创建计划表
执行$ORACLE_HOME/sqlplus/admin/plustrce.sql创建plustrace角色
如果想计划表让每个用户都能使用,则
SQL>create public synonym plan_table for plan_table;
SQL> grant all on plan_table to public;
如果想让自动跟踪的角色让每个用户都能使用,则
SQL> grant plustrace to public;
通过如下语句开启/停止跟踪
SET AUTOTRACE ON |OFF
| ON EXPLAIN | ON STATISTICS | TRACEONLY | TRACEONLY EXPLAIN 查看全文

一条SQL语句的优化过程

发表人:xiaoxiongg | 发表时间: 2004年十月09日, 19:50

很简单的一次调整,语句加了适当的索引后性能就有大幅的提升。当时看到这条语句的时候,第一感觉就是执行效率肯定低下。语句的功能是求某一客户当天产品的总销量。原来的语句是这样的:


select sum(sl0000) from xstfxps2 where
dhao00 in (
select dhao00 from xstfxps1 where trunc(ywrq00)=trunc(sysdate)
and khdm00='500000003913');

 查看全文

CBO/RBO运行机制的中度理解

发表人:xiaoxiongg | 发表时间: 2004年十月03日, 08:58

本文为Tim Gorman关于CBO一篇文章的读后感。

主要分为两部分:
1)RBO如何工作的:
工作原理;举例论证;得到的结论
2)CBO如何工作的:
cost的计算;physical and logical I/O的比较;
部分参数的介绍;

 查看全文

Valid XHTML 1.0 Strict and CSS. Powered by pLog
Design by Blog.lvwo.com