Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fragmented tables

Status
Not open for further replies.

JasonCooper

IS-IT--Management
Dec 14, 2001
20
0
0
GB
Hi

I need to 'defrag' some tables and wonder if the following method is the best way:

1. export table(s)
2. drop table 'tablename' cascade constraints
3. Import table(s)

It's mainly the drop command I'm unsure about.

Thanks
 
Why do you need to defrag? How do you know they are fragmented. If your talking about chained rows then let me know and show you a way of sorting them out, if you talking extents also let me know as having loads of extents isn't always a bad thing either.

--
| Mike Nixon
| Unix Admin
|
----------------------------
 
I suppose, you can not restore constraints that reference this table, as they "belongs" to other objects thus will be missed in export. BTW, why do you need it?

Regards, Dima
 
Mike, Dima, I have tables with many extents, most under 10 extents the rest are between 25 - 100 extents. It's been recommended we defrag when a table reaches >5 extents.

Thanks
 
Use local managed tablespaces and forget about extents.
If you need to bring your tables into 1 extend, better use
alter table move and rebuild your indexes on that table afterwards.

Stefan
 
Thanks very much mrn, sem and stefanhei.

> sem, that makes interesting reading and makes alot of sense, we have no performance issues at the moment so I'm not going to lose any sleep over the extents at the moment.

Many thanks everybody
 
Though, defragmenting tablespace is not so useless :)

Regards, Dima
 
@sem: use LMT and you no longer have to defragment ;-)

Stefan
 
Stefan: I have NO PROBLEMS, Jason thinks he has :)

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top