--1、查看表空间的名称及大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tablespaces t, dba_data_files d WHERE ...
最新数据库空间有感觉捉急了,上次,删了些数据空了 G,撑了一个多月,现在还有 G,每天 G的增量,多少空间也感觉不够用啊。 不能加硬盘,就只有删数据了。。 删数据,人懒,直接找表行最多,占空间最大的表删 于是就有了下面一段SQL: 查看所有表的行数,所占空间大小,可能会不太准 上次数据库分析后,有CRUD操作的表,可能会有偏差 。 ...
2017-09-21 11:06 0 3304 推荐指数:
--1、查看表空间的名称及大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tablespaces t, dba_data_files d WHERE ...
--1、查看表空间的名称及大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tablespaces t, dba_data_files d WHERE ...
--1、查看表空间的名称及大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tablespaces t, dba_data_files d WHERE ...
...
在ORACLE数据库中,所有数据从逻辑结构上看都是存放在表空间当中,当然表空间下还有段、区、块等逻辑结构。从物理结构上看是放在数据文件中。一个表空间可由多个数据文件组成。系统中默认创建的几个表空间:SYSTEM,SYSAUX,USERS,UNDOTBS1,EXAMPLE,TEMP还有用 ...
查询object的大小,按照降序排序 select * from user_segments s where s.BYTES is not null order by s.BYTES desc 或 select a.segment_name ...
select t.owner, t.tablespace_name, t.segment_name, --'drop table '||t.segment_name||' purge;', t.seg ...
select t.table_name,t.num_rows from user_tables t ORDER BY NUM_ROWS DESC;//实际行数 analyze table emp compute statistics; select num_rows ...