Recommendation -------------- - 考虑收集此表的优化程序统计信息。
execute dbms_stats.gather_table_stats(ownname => 'HJ', tabname => 'DBTAN', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL COLUMNS SIZE AUTO'); Rationale --------- 为了选择好的运行计划, 优化程序须要此表的最新统计信息。 2- Index Finding (see explain plans section below) -------------------------------------------------- 通过创建一个或多个索引能够改进此语句的运行计划。 Recommendation (estimated benefit: 95.98%) ------------------------------------------ - 考虑执行能够改进物理方案设计的訪问指导或者创建推荐的索引。 create index HJ.IDX$$_00360001 on HJ.DBTAN("OBJECT_TYPE"); Rationale --------- 创建推荐的索引能够显著地改进此语句的执行计划。
可是, 使用典型的 SQL 工作量执行 "訪问指导" 可能比单个语句更可取。通过这样的方法能够获得全面的索引建议案, 包含计算索引维护的开销和附加的空间消耗。 ------------------------------------------------------------------------------- EXPLAIN PLANS SECTION ------------------------------------------------------------------------------- 1- Original ----------- Plan hash value: 1782547706 -------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 11 | 4706 (1)| 00:00:57 | | 1 | RESULT CACHE | 81z3k6zbauk9s2c83c03s270ja | | | | | | 2 | SORT AGGREGATE | | 1 | 11 | | | |* 3 | TABLE ACCESS FULL| DBTAN | 40006 | 429K| 4706 (1)| 00:00:57 | -------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 3 - filter("OBJECT_TYPE"='TABLE') Result Cache Information (identified by operation id): ------------------------------------------------------ 1 - column-count=1; dependencies=(HJ.DBTAN); attributes=(single-row); parameters=(nls); name="select /*+ result_cache */ count(*) from (select * from HJ.dbtan where object_type='TABLE' ORDER BY 1 DESC ,2 ASC ,3 DESC ,4 AS 2- Using New Indices -------------------- Plan hash value: 2810514733 ------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 11 | 189 (1)| 00:00:03 | | 1 | RESULT CACHE | 27yjysxpdun18b2utun82bynny | | | | | | 2 | SORT AGGREGATE | | 1 | 11 | | | |* 3 | INDEX RANGE SCAN| IDX$$_00360001 | 40006 | 429K| 189 (1)| 00:00:03 | ------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 3 - access("OBJECT_TYPE"='TABLE') Result Cache Information (identified by operation id): ------------------------------------------------------ 1 - column-count=1; dependencies=(HJ.DBTAN); attributes=(single-row, ordered); parameters=(nls); name="select /*+ result_cache */ count(*) from (select * from HJ.dbtan where object_type='TABLE' ORDER BY 1 DESC ,2 ASC ,3 DESC ,4 AS" ------------------------------------------------------------------------------- begin DBMS_SQLTUNE.drop_tuning_task (task_name => 'ft8s1pfmz9ph0d_AWR_tuning_task');end;
版权声明:本文博主原创文章。博客,未经同意不得转载。
转载于:https://www.cnblogs.com/bhlsheji/p/4822109.html
相关资源:数据结构—成绩单生成器