Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: fragmentation

Re: fragmentation

From: Lothar Armbruester <lothar.armbruester_at_rheingau.netsurf.de>
Date: 1998/01/23
Message-ID: <823.327T259T12402294@rheingau.netsurf.de>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US