易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle sql优化之多表连接优化


Use equality first.
使用等连接
Use range operators only where equality does not apply.
只有在等连接不可用的情况下事由区间连接
Avoid use of negatives in the form of !=
or NOT.
避免使用 != 或者 not
Avoid LIKE pattern matching.
避免使用 LIKE匹配
Try to retrieve specific rows and in small numbers.
尝试查找特殊的列和在小的数目中
Filter from large tables first to reduce rows joined.
Retrieve tables in order from the most highly filtered table downwards;
preferably the largest table has the most filtering applied.
过滤大表减少连接的行数,从过滤多的表向下查找,尽可能的过滤大表
Tip 
The most highly filtered table is the table having the
smallest percentage of its rows retrieved, preferably the largest
table.
Use indexes wherever possible except for very small
tables.
除非很小的表,无论什么情况多有索引
Let the Optimizer do its job.
让优化器做优化


相关文档:

命令行维护Oracle AWR

命令行维护Oracle AWR
 
 有时候由于种种原因,只能使用命令行来维护Oracle10g。当然我们依然可以使用statspack,但由于statspack功能不如AWR,而
且如果使用两种性能诊断工具也是一种浪费。因此手动维护AWR还是有必要的,下面列出一些常用的AWR命令,以备后查。
   
1、修改AWR的触发频率
......

Oracle 表空间基本操作

 
1. 查询数据库现在的表空间
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
 
2. 建立表空间
CREATE TABLESPACE data01 DATAFILE '/oracle/ ......

oracle forall语句

 FORALL语句的一个关键性改进,它可大大简化代码,并且对于那些要在PL/SQL程序中更新很多行数据的程序来说,它可显著提高其性能。
1:
用FORALL来增强DML的处理能力
Oracle为Oracle8i中的PL/SQL引入了两个新的数据操纵语言(DML)语句:BULK COLLECT和FORALL。这两个语句在PL/SQL内部进行一种数组处理
;BULK COLLE ......

oracle client连接

最近一段时间一直没写博客,不是懒,是学了太多东西。以后慢慢补上。 1. odbc中添加oracle数据源 odbc中添加oracle数据源首要条件:安装oracle client。安装完之后添加,但是还必须在安装目录下通常是C:\oracle\ora90\network\ADMIN\tnsnames.ora中添加一个连接,如下格式: DXS =
  (DESCRIPTION =
  ......

Oracle外部表小例

1)建立操作系统目录e:\test,准备数据文件dept.txt并置于e:\test之下
"10","ACCOUNTING","NEW
YORK"
"20","RESEARCH","DALLAS"
"30","SALES","CHICAGO"
"40","OPERATIONS","BOSTON"
2)创 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号