摘要: Using System StatisticsSystem statistics enable the CBO to use CPU and I/O characteristics.System statistics must be gathered on a regular basis;this does not invalidate cached plans.Gathering system statistics equals analyzing system activity for a specified period of time.所有的System Statistics 信息,都 阅读全文
posted @ 2013-05-07 18:48 ArcerZhang 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Generating HistogramsHistogram statistics are generated by:SQL>EXECUTE dbms_stats.gather_table_stats('HR','EMPLOYEES',METHOD_OPT => 'FOR COLUMNS SIZE 10 salary') ;Histograms are specified using the METHOD_OPT argument of the DBMS_STATS gathering procedure.Oracle recomme 阅读全文
posted @ 2013-05-07 17:52 ArcerZhang 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Skewed Data分析上述SQL语句,如果查询的数据很多,多到接近于整张表的数据了,那这个时候查询最优执行计划,就是全表扫描(full scan);如果查询的数据不是很多,此时就最好按照索引查询.数据的分布不同,最优的执行计划也不相同. 阅读全文
posted @ 2013-05-07 16:54 ArcerZhang 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 总结Table statistics ---> DBA_TABLES;获取Table statistics,通过DBA_TABLES 数据字典SQL> cldesc DBA_TABLES; Name Null? Type ----------------------------------------- -------- ---------------------------- OWNER NOT NULL VARCHAR2(30) TABLE... 阅读全文
posted @ 2013-05-07 15:32 ArcerZhang 阅读(276) 评论(0) 推荐(0) 编辑
摘要: When to Gather Statistics在10g、11g里面,搜集statistics信息分自动和手工方式两种.Table StatisticsNumber of rowsNumber of blocks and empty blocksAverage available free spaceNumber of chained or migrated rowsAverage row lengthLast analyze date and smaple sizeData dictionary view:dba_tables查看表的统计信息,主要依据数据字典dba_tablesIndex 阅读全文
posted @ 2013-05-07 13:27 ArcerZhang 阅读(121) 评论(0) 推荐(0) 编辑
摘要: OjbectivesAfter completing this lesson,you should be able to do the followingUnderstanding Statistics管理statistic的package:dbms_stats.Managing StatisticsUse the dbms_stats packages:gather_table_statsgather_index_statsgather_schema_statsgahter_database_statsgather_stable_stats创建表、插入数据SQL> create tab 阅读全文
posted @ 2013-05-07 13:15 ArcerZhang 阅读(200) 评论(1) 推荐(0) 编辑
摘要: placheholder 阅读全文
posted @ 2013-05-07 11:07 ArcerZhang 阅读(86) 评论(0) 推荐(0) 编辑
摘要: placeholder 阅读全文
posted @ 2013-05-07 11:04 ArcerZhang 阅读(106) 评论(0) 推荐(0) 编辑
摘要: placeholder 阅读全文
posted @ 2013-05-07 11:03 ArcerZhang 阅读(127) 评论(0) 推荐(0) 编辑
摘要: placeholder 阅读全文
posted @ 2013-05-07 11:00 ArcerZhang 阅读(86) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Set up Database Resource ManagerAssign users to Resource Manager groupsCreate resource plans within groups更加强大的手段来控制每个用户或者每组用户资源使用情况. 阅读全文
posted @ 2013-05-07 10:59 ArcerZhang 阅读(99) 评论(0) 推荐(0) 编辑