select a.segment_name,sum(bytes)/1024/1024 from user_segments a where segment_type='TABLE' AND segment_name=tablename group by a.segment_name不知道对不对
别人提供的两个方法: 1.select bytes from dba_segments where segment_name = tabl_name and owner = user;2.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
select segment_name,sum(bytes)/1024/1024 from dba_extents where segment_name ='表名'另外 查看当前用户每个表占用空间的大小: Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name 查看每个表空间占用空间的大小: Select Tablespace_Name,Sum(bytes)/1024/1024 From Dba_Segments Group By Tablespace_Name
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name; 单位是m
where segment_type='TABLE' AND segment_name=tablename
group by a.segment_name不知道对不对
1.select bytes from dba_segments where segment_name = tabl_name and owner = user;2.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
where segment_name ='表名'另外
查看当前用户每个表占用空间的大小:
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name 查看每个表空间占用空间的大小:
Select Tablespace_Name,Sum(bytes)/1024/1024 From Dba_Segments Group By Tablespace_Name
单位是m