Can someone help me please?
I have a table with lots of extents. How can I resize the table's initial size so all data will be held in the first extent?
Thanks
Originally posted by jovery or you can export the data, recreate the table, import the data
or you can export the data with compress=y, drop the table and import the data
Tomaž "A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams
There are many ways as mentioned by two of our mates. But the question is Why ? Yes, Export and import does it and it has been a traditional way and this tool was made to this job . It is for a different purpose.
You may want to look at storage parameters for the tables and sort them if you fear you may hit max extents. Its best to go for LMT with uniform extents and forget about the number of extents . It does affect the performance. Even if all the data is in one extent its still all over the disk and not contiguous .
Originally posted by Mr.Hanky I think you are missing one important step here.
Shoot!
Tomaž "A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams
Originally posted by TomazZ or you can export the data with compress=y, drop the table and import the data
It's not really adviable to use the compress=y unless you are sure that the data content of the table is using all of the space currently allocated.
If you have a table which has allocated 200Mb of extents yet the data contained within the table is only 10Mb (due to deletes, etc) then the compress=y will build a table with a single 200Mb extent rather than a single 10Mb extent.
IMHO it is better to establish the storage requirement first.
REgards
Jim
Oracle Certified Professional "Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Tomaž "A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams
Simply use an 'alter table move...' and specify a new storage clause, including a new intial extent. You do not have to move the table to a new tablespace - if you do not specify a tablespace it will be moved to a new extent in the same tablespace. This will preserve your constraints, indexes, and permissions.
Bookmarks