Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: fragmentation
On 22-Jan-98 17:06:17 gloriath wrote:
> Hello,
Hello!
> I want to know how to defragment a tablespace easy. Is there a command to
>do this ?
If you have Oracle 7.3, you can use
alter tablespace your_tablespace coalesce;
This will merge neighboured pieces of free space. It is most efficient, if you export all objects from the tablespace, then drop all objects, do the coalesce and finally reimport the objects. If you don't drop all objects, the tablespace may stay fragmented:
Create tables T1, T2, T3 and T4. Then drop T2 and T4. The free space owned by T2 and T4 is generally not neighboured so cannot be coalesced.
> Thank you.
Hope that helps,
Lothar
-- Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Fri Jan 23 1998 - 00:00:00 CST