![](https://csdnimg.cn/release/download_crawler_static/5134228/bg14.jpg)
Tianlesoftware 学习 Oracle Blog: http://blog.csdn.net/tianlesoftware
DBA1 群:62697716(满); DBA2 群:62697977(满); DBA3 群:62697850(满); DBA 超级群:63306533
DBA4 群:83829929(满); DBA5 群:142216823 DBA6 群:158654907
7.7.2.1 查看该 Job 信息 .................................................................................................................... 1268
7.2.2.2 监控参数 STATISTICS_LEVEL .................................................................................................. 1269
7.2.2.3 停用该 Job .............................................................................................................................. 1269
7.2.3.4 系统用户统计信息的收集 ...................................................................................................... 1269
7.7.3.
统计信息的存储位置
.................................................................................................... 1270
7.3.3.1 表的统计信息 ......................................................................................................................... 1271
7.3.3.2 索引列的统计信息 ................................................................................................................. 1271
7.3.3.3 列的统计信息 ......................................................................................................................... 1271
7.3.3.4 测试:表只有分析了之后,num_rows 才会有值 ............................................................... 1271
7.7.4
直方图(
histograms
)
................................................................................................. 1272
7.7.4.1 Height-Balanced Histograms ................................................................................................. 1273
7.7.4.2 Frequency Histograms ........................................................................................................... 1274
7.7.5 DBMS_STATS
包
使用说明
........................................................................................... 1276
7.7.5.1 DBMS_STATS 包的几个常用功能:性能的收集,设置,删除 ............................................. 1277
7.7.5.1.1 GATHER_TABLE_STATS 存储过程 ............................................................................... 1277
7.7.5.1.2 GATHER_SCHEMA_STATS 存储过程 ............................................................................ 1283
7.7.5.1.3 DBMS_STATS.GATHER_INDEX_STATS 存储过程 ........................................................... 1287
7.7.5.2 DBMS_STATS 包管理功能 ........................................................................................................ 1289
7.7.5.2.1 获取分析数据 ................................................................................................................ 1289
7.7.5.2.2 设置分析数据 ................................................................................................................ 1290
7.7.5.2.3 删除分析数据 ................................................................................................................ 1290
7.7.5.2.4 保存分析数据 ................................................................................................................ 1291
7.7.5.2.5 导入和导出分析数据..................................................................................................... 1291
7.7.5.2.6 锁定分析数据 ................................................................................................................ 1292
7.7.5.2.7 分析数据的恢复 ............................................................................................................ 1292
7.7.6
动态采样
...................................................................................................................... 1293
7.7.6.1 什么是动态采样 ..................................................................................................................... 1293
7.7.6.2 动态采样的级别 ..................................................................................................................... 1296
7.7.6.2.1 Level 0 .............................................................................................................................. 1297
7.7.6.2.2 Level 1 .............................................................................................................................. 1297
7.7.6.2.3 Level 2 .............................................................................................................................. 1297
7.7.6.2.4 Level 3 .............................................................................................................................. 1297
7.7.6.2.5 Level 4 .............................................................................................................................. 1297
7.7.6.2.6 Level 5,6,7,8,9 ...................................................................................................... 1297
7.7.6.2.7 Level 10 ............................................................................................................................ 1297
7.7.6.3 什么时候使用动态采样 ......................................................................................................... 1297
7.8 HINT .......................................................................................................................................... 1298
7.8.1
和优化器相关的
Hint ..................................................................................................... 1300
7.8.1.1 ALL_ROWS 和 FIRST_ROWS(n) -- CBO 模式 .................................................................... 1300
7.8.1.2 RULE Hint -- RBO 模式 ....................................................................................................... 1300
7.8.2
访问路径相关的
Hint ...................................................................................................... 1301
7.8.2.1 FULL Hint .................................................................................................................................. 1301
7.8.2.2 INDEX Hint ................................................................................................................................ 1301
7.8.2.3 NO_INDEX Hint ......................................................................................................................... 1302