oracle里查看具体一张表所占空间的大小的方法:
1:简单的方法:使用数据泵导入导出的时候,可以自行查看
2:通过计算oracle体系结构里的data_block,extent,segment,tablespace里面的值来计算oracle表的大小
select owner,table_name, NUM_ROWS, BLOCKS*AAA/1024/1024 "Size M", EMPTY_BLOCKS, LAST_ANALYZED from dba_tables where table_name='XXX'; Here: AAA is the value of db_block_size ; XXX is the table name you want to check |
这是sql
方法2:select bytes from dba_segments where segment_name = tabl_name and owner = user;
还有,oracle的pctfree的会有一份多余的空间,文件头占用的空间。
这是oracle自身的建表语句里的自身的东西。
转载于:https://blog.51cto.com/yuangeqingtian/1325445