各数据库中命令行查看大小

上一篇 / 下一篇  2009-08-24 13:53:23 / 个人分类:工作中需要的知识

oracle

查看表大小

analyze table * compute statistics ;

select num_rows * avg_row_len/1024/1024 from user_tables where table_name='表名大写';

查看lob字段大小:

select sum(dbms_lob.getlength(大对象列名)) from 表名;

查看表/索引大小:

select sum(bytes)/(1024*1024) as "size(M)" from user_segments where segment_name=upper("索引名"/"表名");

神通数据库

查看表大小:

select size from sys_class,v_segment_info where id=relid and relname=‘表名’;

查看lob字段:

select sum(blob/clob_getlength(大对象列名)) from 表名;

查看索引大小:

select * from sys_namespace where nspname='大写模式名';

select relpages * 8192() from sys_class where relnamespace='oid' and relname='大写索引名';

 


TAG: 索引 Oracle oracle 神通 大对象 大小

 

评分:0

我来说两句

日历

« 2024-01-22  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 17329
  • 日志数: 16
  • 图片数: 1
  • 建立时间: 2008-09-14
  • 更新时间: 2010-07-21

RSS订阅

Open Toolbar