Oracle根据表的大小排序SQL语句

--按照数据行数排序
select table_name,blocks,num_rows
from dba_tables
where owner not like '%SYS%' and table_name not like '%$%' and num_rows is not null
order by num_rows desc;
--按照表占用的数据块
select table_name,blocks,num_rows
from dba_tables
where owner not like '%SYS%' and table_name not like '%$%' and blocks is not null
order by blocks desc;

你可能感兴趣的:(oracle)