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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Delete vs. truncate to free up spaces.

RE: Delete vs. truncate to free up spaces.

From: anu <anu_77_d_at_yahoo.com>
Date: Mon, 22 Dec 2003 15:59:24 -0800
Message-ID: <F001.005DAA98.20031222155924@fatcity.com>

And synonyms will have to be re-created. (drop and create).
 
Grants will have to be given.

Jared Still <jkstill@cybcon.com> wrote:
... and if your table is not partitioned, consider using
'CREATE TABLE AS' with WHERE clause that eliminates the
rows you wish to delete, recreate indexes and constraints
on the new table, drop the old table, rename the new to
the old.

Keep in mind that stored procedures and triggers that
reference the table will need to be recompiled.

Jared

On Mon, 2003-12-22 at 14:44, Jacques Kilchoer wrote:
> This is one of the cases where a partitioned table can be of great use. What version of Oracle? Standard or Enterprise Edition?
> With a partitioned table you can say
> alter table ... drop partition ... ;
> to easily get rid of a large chunk of data and release the space.
>
> See
> Oracle9i Database Concepts Release 2 (9.2)
> Part Number A96524-01
> Chapter 11
> Partitioned Tables and Indexes
> http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c12parti.htm#464767
>
> or
>
> http://tinyurl.com/362ba
>
>
> -----Original Message-----
> Nguyen, David M
>
> I am using delete command to delete million records in several tables to free up space in tablespace. I understand delete command does not release unused spaces as truncate command but I could not use truncate to delete ALL records in table as I need to keep one month old of records in table. Please advise a better method I can use to free up spaces.
> Thanks,
> David
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jacques Kilchoer
> INET: Jacques.Kilchoer@quest.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>


--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jared Still
INET: jkstill@cybcon.com

Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).


Do you Yahoo!?
Free Pop-Up Blocker - Get it now
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: anu
  INET: anu_77_d_at_yahoo.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Dec 22 2003 - 17:59:24 CST

Original text of this message

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