Oracle分析表简介
来源:互联网 发布:基因武器 知乎 编辑:程序博客网 时间:2024/06/06 19:25
Oracle分析表简介
Oracle分析表是Oracle数据库管理的重要部分,下面就为您详细介绍Oracle分析表方面的知识,希望对您学习Oracle分析表方
面能有所帮助。
1、分析SQL:
analyze table tablename compute statistics
等同于 analyze table tablename compute statistics for table for all indexes for all columns
for table的统计信息存在于视图:user_tables 、all_tables、dba_tables
for all indexes的统计信息存在于视图: user_indexes 、all_indexes、dba_indexes
for all columns的统计信息存在于试图:user_tab_columns、all_tab_columns、dba_tab_columns
删除分析SQL:
analyze table tablename delete statistics 会删除所有的statistics
2、Oracle分析表的作用:为了使基于CBO的执行计划更加准确
DBA_tables的数据有变化,可做对比。详见官方文档:
Use the ANALYZE statement to collect non-optimizer statistics, for example, to:
Collect or delete statistics about an index or index partition, table or table partition, index-organized
table, cluster, or scalar object attribute.
Validate the structure of an index or index partition, table or table partition, index-organized table,
cluster, or object reference (REF)。
Identify migrated and chained rows of a table or cluster.
dbms_stats的作用主要是替代analyze的收集统计信息这一块的功能,且在这一方面做了相当大程度上的增强。
以analyze table table_name compute statistics;这条为例,生成的统计信息会存在于user_tables这个视图,查看一下
select * from user_tables where table_name='table_name';
观察一下NUM_ROWS,BLOCKS,AVG_SPACE,AVG_ROW_LEN几列你就会明白,这就是变化。
Oracle分析表是Oracle数据库管理的重要部分,下面就为您详细介绍Oracle分析表方面的知识,希望对您学习Oracle分析表方
面能有所帮助。
1、分析SQL:
analyze table tablename compute statistics
等同于 analyze table tablename compute statistics for table for all indexes for all columns
for table的统计信息存在于视图:user_tables 、all_tables、dba_tables
for all indexes的统计信息存在于视图: user_indexes 、all_indexes、dba_indexes
for all columns的统计信息存在于试图:user_tab_columns、all_tab_columns、dba_tab_columns
删除分析SQL:
analyze table tablename delete statistics 会删除所有的statistics
2、Oracle分析表的作用:为了使基于CBO的执行计划更加准确
DBA_tables的数据有变化,可做对比。详见官方文档:
Use the ANALYZE statement to collect non-optimizer statistics, for example, to:
Collect or delete statistics about an index or index partition, table or table partition, index-organized
table, cluster, or scalar object attribute.
Validate the structure of an index or index partition, table or table partition, index-organized table,
cluster, or object reference (REF)。
Identify migrated and chained rows of a table or cluster.
dbms_stats的作用主要是替代analyze的收集统计信息这一块的功能,且在这一方面做了相当大程度上的增强。
以analyze table table_name compute statistics;这条为例,生成的统计信息会存在于user_tables这个视图,查看一下
select * from user_tables where table_name='table_name';
观察一下NUM_ROWS,BLOCKS,AVG_SPACE,AVG_ROW_LEN几列你就会明白,这就是变化。
- Oracle分析表简介
- oracle 分析表简介
- oracle分析函数简介
- oracle 分析函数lag 和 lead 简介
- oracle lag与lead分析函数简介
- oracle lag与lead分析函数简介
- oracle lag与lead分析函数简介
- oracle lag与lead分析函数简介
- oracle lag与lead分析函数简介
- Oracle-表连接简介
- oracle表空间简介
- Oracle嵌套表简介
- ORACLE 收缩表(shrink)简介
- ORACLE、DB2临时表简介
- 【转】oracle lag与lead分析函数简介
- Oracle官网JNI简介和接口函数分析
- 笔记:Oracle SQL 高级查询简介 (2) 分析函数
- Oracle---简介
- andorid开发关键技术
- vim基本使用方法
- Java中获得文件路径的几种方式
- 'ping'不是内部或外部命令,也不是可执行程序 解决如下
- 心情不好看看这些话,也许你会找到答案
- Oracle分析表简介
- linux meminfo 详解 (转)
- oracle查看数据库连接数量的SQL
- s2c2440 rtc 平台设备驱动 卸载问题 oops
- 对WebService "style" "use"消息格式的理解
- 设置登陆数据库的超时时间
- js onclick(), iframe 中显示
- ios创建库及其调用
- 由CSDN争议的问题想到的!--->(boolean值带来的效率问题)