绍Oracle数据库的优化之数据库磁盘I/O
绍Oracle数据库的优化之数据库磁盘I/Ohttp://doc.chinaunix.net/oracle/200905/208827.shtmlv$filestat ,v$latch, v$queue, v$shared_server v$waitstat[@more@]
outline study note
public stored in schema of outln.dic table: ol$, ol$hintskey knowledge:signature column of ol$. It is similar as sql hash value but with some different characteristic:1, space char and line-feed char are not including to calculated signature.2, Upper case and lower case of a character get the same signature value.---- optimize sql by outline method guide.1, create current sql outline .2, tune sql code until be satisfied with the performance. Some skill can used in this stage: 1>use sql hints
table column histogram .亲自实验检验得出的学习笔记。
-- 看来,学习还是要时常牢记那句话:纸上得来终觉浅,绝知此事要躬行。http://yong321.freeshell.org/oranotes/Histogram.htmlhttp://www.oracle.com.cn/viewthread.php?tid=67935表字段柱状图的理解:-- dictionary : dba_tab_col_statistics/user_tab_col_statisticsdba_tab_histogram/user_tab_histogram-- definition:the definition name is base the meaning of column endpoint_number.1, 当字段列DISTINCT VALUE>255 时,只能建立HBH(HEIGHT-BALANCED)HISTOGRAM. 即:平衡树。here endpoint_number is stand for card-weight
SQL 执行计划案例1
http://www.bitscn.com/pdb/oracle/200809/151545.htmlRESOLVE METHOD:CHECK EXECUTE PLAN:SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY); 1, CHECK IF THERE IS CARTESIAN .2,CHECK TABLE STATISTICS.3, IF USE PREDICT FILTER ON TABLE, THEN CHECK COLUMN STATISTICS .4, UPDATE TABLE STATISTICS. SQL> EXEC DBMS_STATS.DELETE_TABLE_STATS(USER, 'ORD_HIT_COMM') PL/SQL procedure successfully completed. SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, 'ORD_HIT_COMM') PL/SQL procedure successfully completed.
sql hint article
unnest, no_ununest, push_subq --- sub querypush_pred, merge, no_merge --- viewshttp://bbs.chinabyte.com/thread-357284-1-1.htmlsql 性能变差原因及办法:http://www.laoxiong.net/how-keeping-sql-plan-stability.htmlrecovery :http://xuqingwei.itpub.net/post/37188/500757[@more@]
索引使用优化的两个操作
analyze index t_test1_idx1 validate structure;会话视图 index_statsalter index pk_emp monitoring usage ;全局视图 v$object_usage [@more@]INDEX_STATS" stores information from the lastANALYZE INDEX ... VALIDATE STRUCTUREstatement.上面语句意思是说index_stats存储最后一次对索引分析结构的信息.判断一个所以是否需要重建,我们介绍一个简单的方法:对一个索引进行结构分析后,如果该索引占用超过了一个数据块,且满足以下条件之一:B-tree树的高度大于3;使用百分比低于75%;数据删除率大于15%,就需要考虑对索引重建: