I exported my table, disable all constraints....
truncated the table...
type - alter table TABLE_A deallocate unused;
I then ran:
select t.owner, t.TABLE_NAME, e.TABLESPACE_NAME, count(*) as cnt
from dba_tables t, dba_extents e
where t.table_NAME = e.SEGMENT_NAME
and e.segment_type = 'TABLE'
group by t.owner, t.TABLE_NAME, e.TABLESPACE_NAME
having count(*) > 2
order by t.owner, e.TABLESPACE_NAME, cnt
It still shows me having like 40 extents... how do I get oracle or dba_extents to update itself?
02-01-2001, 03:54 PM
1.) export the table, definitions and data with compress=y
2.)drop the original table.
3.)import the table
02-01-2001, 04:56 PM
Is there a way to do it without dropping the table?
I compressed the export (which is the default)... and i then altered the table and set the NEXT to like 10M, from 100K.
im not sure how to get around it.
02-01-2001, 04:57 PM
if you already truncated it, is there a reason not to drop it?
02-01-2001, 05:14 PM
try alter table X deallocate unused KEEP 1K. I think this will drop all of the extents except the first one. THen you can make your next extent nice and big. Is 2 extents close enough?
02-01-2001, 05:15 PM
If you are in 8i use the alter table move table it does the same job as you want .You need not export nor import.
only thing u need to rebuild the indexes..