Skip to content

Instantly share code, notes, and snippets.

@Tracnac
Created October 19, 2022 11:41
Show Gist options
  • Select an option

  • Save Tracnac/3a3d2a886141f6e5a177aefe7fc2c7ab to your computer and use it in GitHub Desktop.

Select an option

Save Tracnac/3a3d2a886141f6e5a177aefe7fc2c7ab to your computer and use it in GitHub Desktop.
Evolution d'une table oracle #oracle #sql
col c1 format a15 heading 'snapshot|date'
col c2 format a25 heading 'table|name'
col c3 format 999,999,999,999 heading 'space|used|total'
col c4 format 999,999,999,999 heading 'space|allocated|total'


select
to_char(begin_interval_time,'yy/mm/dd hh24:mm') c1,
object_name c2,
space_used_total c3,
space_allocated_total c4
from
dba_hist_seg_stat s,
dba_hist_seg_stat_obj o,
dba_hist_snapshot sn
where
o.owner = '&schema.'
and
s.obj# = o.obj#
and
sn.snap_id = s.snap_id
and
object_name like '&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