您的位置:首页 > 数据库

Tuning SQL note1

2005-12-28 09:20 162 查看
Optimizer_mode : RULE | FRIST_ROWS | ALL_ROWS | CHOOSE
COST : run by FTS Which don't need , Iespeacial under 3 tables jion
RULE : choose error index
FULL TABLE SCAN 临界条件:
1. sorted table -- > 40% rows need be seleced using FTS
2. unsorted table -- >7%rows need be selected using FTS
About driver table under RULE : 返回行最小的表should be put the frist position in  where clause ,but COST auto choose driver table .
COST : need all tables and indexes be analyzed .   dbms_utility.analyze_schema('schema_name','','','FOR TABLE FOR ALL INDEXES')
CBO SQL TIPS
/*+ rule*/ 
/*+ full, table =xxx parallel = nn */
/*+ table =xxx index=xxx */
/*+ frist_rows */
/*+ use_hash */
CUSOR_SHARING =FORCE
OUTLINE : hard sql execute plan

TOOLS : XPLAN , TIMING ON
oracleHu 2005-10-28
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql table schema parallel tools