Re: Urgent question about tables!
Posted in 1998
Pete Smith wrote: > > Hi all > > As a slight diversion from this thread, if the statement below is a faster means > of moving a table, would it also be a faster way of defragmenting a table with > many extents? > I usually unload a table, drop it, recreate it with a first and next extent, > reload the data and then recreate any indexes. > I do not have the resource to test this with a decent volume, but would appreciate > any views. > > many thanks > Pete Smith > > Art S. Kagel wrote: > > > BTW in 7.xx the fastest way to move the table seems to be the ALTER > > FRAGMENT .... INIT IN <dbspace> command. Yes, it seems to be since it saves the intermediate I/Os and seems to move whole pages. It is also faster than ALTER INDEX ... TO CLUSTER since it does not need to sort rows and rebuild any indexes. BTW if any of your indexes are detached then there is no contest! ALTER FRAGMENT ... INIT IN ... is clearly faster. Art S. Kagel