1.查询普通行的数据所占空间:
表:DIM_USAGE
如表结构:
create table DIM_USAGE
(
USAGE VARCHAR2(20),
USAGE_NAME VARCHAR2(120)
)
求所有记录行所占空间:
select 3+vsize(USAGE)+1+nvl(vsize(USAGE_NAME),0)+1 from DIM_USAGE;
2.查询含有 BLOB字段的空间大小
select dbms_lob.getLength(ATTACHMENT_CONTENT)/1024 ||'KB' from TOP_ATTACHMENT_CONTENT a
;