oracle怎样查询表的大小
时间:2022-01-05 15:06
在oracle中,可以利用“select round(sum(BYTES)/1024/1024,2)||'M' from dba_segments where segment_name='表名'”语句查询表的大小。 本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。 oracle怎样查询表的大小 有两种含义的表大小。一种是分配给一个表的物理空间数量,而不管空间是否被使用。可以这样查询获得字节数: 或者 另一种表实际使用的空间。这样查询: 查看每个表空间的大小 推荐教程:《Oracle教程》 以上就是oracle怎样查询表的大小的详细内容,更多请关注gxlsystem.com其它相关文章!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';
Select Tablespace_Name,Sum(bytes)/1024/1024 From Dba_Segments Group By Tablespace_Name