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: How to shrink a table?

Re: How to shrink a table?

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: Thu, 30 Jul 1998 14:13:37 GMT
Message-ID: <35c07c6e.7125745@news.dvol.com>


Either of the previous suggestions will work. Just be careful if you have referential integrity constraints on other tables (child tables) that reference the one(s) being reorganized (parent tables). If you do you must first drop those constraints before truncating or dropping the parent table, and recreate them afterwards. You're application should not be running when you do this or else orphan rows might be inserted into the child tables after the RI constraints have been dropped.

If the table has frequent deletes but sill keeps growing, you may need to increase it's pctused parameter to insure blocks are getting on the freelist so that deleted space can be reused.

        Chuck

On Wed, 29 Jul 1998 22:02:21 -0700, "David Rueter" <drueter_at_assyst.com> wrote:

>I have an Oracle 7 tablespace that is nearly full.
>
>Rather than adding a file to the tablespace, I have deleted some unneeded
>rows from some tables.
>
>However, the sizes of the tables do not change when I delete the rows.
>
>I guess tables grow automatically, but don't automatically shrink. Is this
>right?
>
>In any case, how can I reduce the size of (shrink) individual tables?
>
>David Rueter
>drueter_at_assyst.com
>

--
Chuck Hamilton
chuckh_at_dvol.com

If at first you don't succeed, sky diving isn't for you. Received on Thu Jul 30 1998 - 09:13:37 CDT

Original text of this message

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