- SELECT owner,
- DECODE (partition_name,
- NULL, segment_name,
- segment_name || ':' || partition_name
- ) NAME,
- segment_type, tablespace_name, BYTES/1024/1024 , initial_extent, next_extent,
- pct_increase, extents, max_extents
- FROM dba_segments
- WHERE 1 = 1 AND extents > 1
- ORDER BY 9 DESC, 3
SELECT owner,
DECODE (partition_name,
NULL, segment_name,
segment_name || ':' || partition_name
) NAME,
segment_type, tablespace_name, BYTES/1024/1024 , initial_extent, next_extent,
pct_increase, extents, max_extents
FROM dba_segments
WHERE 1 = 1 AND extents > 1
ORDER BY 9 DESC, 3
- 也可以这样,查一个表占用的总空间:
- select trunc(sum(bytes)/1024/1024,3) from dba_segments
- where segment_name=&table_name and
- owner=&owner_name