Oracle

From Alessandro's Wiki
Revision as of 15:13, 11 December 2013 by Xunil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


  • check stats enabled:
SELECT DBMS_STATS.get_prefs('PUBLISH') FROM dual;
  • list of tables ordered by size
select segment_name,segment_type,bytes ,max_size  from user_segments  ORDER BY bytes DESC
  • disable constraint
alter table table_name  disable constraint <constraint>;
  • enable constraint
alter table table_name  enable constraint <constraint>;
  • empty table and release space
truncate table table_name DROP STORAGE;