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
Next revisionBoth sides next revision
oracle:oracle_sql_querys:storage_management [2018/10/10 08:23] dodgeroracle:oracle_sql_querys:storage_management [2021/01/13 17:16] – [Space used by a table with LOB columns] dodger
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>