User Tools

Site Tools


dba:oracle:oracle_sql_querys:storage_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
oracle:oracle_sql_querys:storage_management [2019/07/18 07:17] – external edit 127.0.0.1dba:oracle:oracle_sql_querys:storage_management [2022/02/11 11:36] – external edit 127.0.0.1
Line 257: Line 257:
             )             )
 ); );
 +</code>
 +
 +
 +
 +==== Space DELTA of a table ====
 +Based on AWR tables:
 +<code sql>
 +
 +SELECT
 +    h.BEGIN_INTERVAL_TIME  || ';' || o.OBJECT_NAME || ';' || s.SPACE_USED_DELTA
 +FROM
 +    DBA_OBJECTS o,
 +    DBA_HIST_SNAPSHOT h,
 +    (
 +        SELECT
 +            SNAP_ID,
 +            TS#,
 +            OBJ#,
 +            SPACE_USED_DELTA
 +        FROM
 +            DBA_HIST_SEG_STAT
 +        where SPACE_USED_DELTA >0
 +    ) s,
 +    v$tablespace t
 +WHERE
 +    s.OBJ# = o.OBJECT_ID
 +    AND   s.TS# = t.TS#
 +    and   o.owner = 'TABLE_OWNER'
 +    and   o.object_type = 'TABLE'
 +    and s.SNAP_ID = h.SNAP_ID
 +ORDER BY
 +    1 desc
 +;
 +
 </code> </code>
  
Line 430: Line 464:
 FROM V$ASM_DISK D, V$ASM_DISKGROUP G FROM V$ASM_DISK D, V$ASM_DISKGROUP G
 WHERE D.GROUP_NUMBER=G.GROUP_NUMBER ; WHERE D.GROUP_NUMBER=G.GROUP_NUMBER ;
-CLEAR COLUMNS;+
 </code> </code>