Skip to content

Instantly share code, notes, and snippets.

@jonahadkins
Created January 23, 2018 15:48
Show Gist options
  • Save jonahadkins/1a9c637cb4c039f1a290859ce4d39d2c to your computer and use it in GitHub Desktop.
Save jonahadkins/1a9c637cb4c039f1a290859ce4d39d2c to your computer and use it in GitHub Desktop.
col a format a15 heading 'snapshot|date'
col b format a25 heading 'table|name'
col c format 999,999,999 'space|used|total'
select
to_char(begin_interval_time, 'yy/mm/dd hh24:mm') a,
object_name b,
space_used_total c
from
dba_hist_seg_stat x
dba_hist_seg_stat_obj y
dba_hist_snapshot z
where
y.owner = 'INSERT_OWNER_NAME'
and
x.obj# = y.obj#
and
z.snap_id = x.snap_id
and
object_name = 'INSERT_TABLE_NAME'
order by
begin_interval_time;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment