Oracle 优化原理

1.Query transformer:
1)View merging - represent the view to the containing query block(table).
2)Predicate pushing - push the relevant predicates from the containing query block into the view.
3)Subquery unnesting - transform a subquery into an equivalent join.
4)Query rewrite - look for materialized views to replace the table.


2.Estimation:
1)Selectivity - a fraction from row set. 0 is more selective for b* tree index, 1 is less selective for bitmap index. 1/count(distinct values)
2)Cardinality - the number of rwos from row set.
3)Cost -  CPU,Memory,I/O as unit of work.

3.Bind variable peeking -  can determine the selectivity estimate.

4.adaptive Cursor Sharing - different plans for different bind values,then a single statement use multiple plans.

5.I/O by block, not row.

6 Index culstering factor -  low,the same indexed column values in the same block(good), high,conversely(bad)

7. Index skip scans - only good when the leading column is big(such as 0.5),It first split the index, then union all the query.

8. Fast full index scans - one column of index has the NOT NULL constraint, and run in parallel.

9. Nested loop join -  small table; Hash join: one small tale, one large table.Sort Merge join: sorted tables; Cartesian join:no join condition.

10.Gathering statistics without sampling requires full table scans and sorts of entire tables.

11.Distributed query optimization uses cost-based optimization to find or generate SQL expressions that extract only the necessary data from remote tables, process that data at a remote site or sometimes at the local site, and send the results to the local site for final processing.

12.Involving a composite index only when the statement contains constructs that use a leading portion of the index.This is no longer the case with index skip scans.

13.T=S/V.T is time. S is the memory(consistent gets). V is CPU,IO(physical read)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值