收集统计信息
2015-01-11 10:03
190 查看
有两种含义的表大小。一种是分配给一个表的物理空间数量,而不管空间是否被使用。可以这样查询获得字节数:select segment_name, bytes
from user_segments
where segment_type = 'TABLE';
或者
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name另一种表实际使用的空间。这样查询:analyze table emp compute statistics;
select num_rows * avg_row_len
from user_tables
where table_name = 'EMP';
第1行是用dbms_stats.gather_table_stats收集的begin dbms_stats.gather_table_stats('SYS','T1');end;第2行是用analyze table T2 compute statistics;收集的analyze table T2 compute statistics;第3行没有收集统计信息最后查询select * from user_tables where table_name in('T1','T2','T3')查询结果
from user_segments
where segment_type = 'TABLE';
或者
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name另一种表实际使用的空间。这样查询:analyze table emp compute statistics;
select num_rows * avg_row_len
from user_tables
where table_name = 'EMP';
第1行是用dbms_stats.gather_table_stats收集的begin dbms_stats.gather_table_stats('SYS','T1');end;第2行是用analyze table T2 compute statistics;收集的analyze table T2 compute statistics;第3行没有收集统计信息最后查询select * from user_tables where table_name in('T1','T2','T3')查询结果
相关文章推荐
- greenplum 收集统计信息
- 秒杀资源统计任务---AIX信息收集器
- 统计信息收集
- Gprof -收集程序的统计信息
- 收集统计信息
- 11g新特性-如何禁用自动统计信息收集作业
- Oracle 判断 并 手动收集 统计信息 脚本
- 关于11g+的统计信息收集
- 收集oracle统计信息
- 收集oracle统计信息
- oracle的统计信息的查看与收集
- 如何 找出未收集统计信息,以及统计信息过期的表
- ORACLE 收集统计信息
- DB2中如何确定某个表的统计信息的收集时间
- [Oracle] 11G自动收集统计信息
- Oracle 10g 统计信息自动收集功能(automatic statistics gathering)
- Oracle11G多列收集统计信息实验
- 统计信息未自动收集(2)
- 统计信息收集进程----数据架构师的PostgreSQL修炼
- 修改10g自动统计信息收集作业GATHER_STATS_JOB到仅仅周末执行