查詢oracle各個表所佔空間大小

select t.segment_name, t.segment_type, sum(t.bytes / 1024 / 1024) AS MB
from dba_segments t
where t.segment_type=‘TABLE’ and (t.segment_name like ‘%yyy%’ or t.segment_name like ‘%xxx%’)
group by OWNER,t.segment_name, t.segment_type order by MB DESC

快速清空表數據保留表結構

truncate table xxx drop storage

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章