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: SPACE FREE HOW?

RE: SPACE FREE HOW?

From: Post, Ethan <Ethan.Post_at_ps.net>
Date: Fri, 18 Jan 2002 13:21:56 -0800
Message-ID: <F001.003F40F6.20020118110100@fatcity.com>

If you have good stats on the table just take the following and compare.

actual size of object vs. (#rows * average row size )

If actual size is much larger than #rows * average row size, you have a lot of unused space in the table, this however does not tell you the high water mark. There are some various methods to determine this but I can't recall offhand, DBMS_SPACE package I think. I have never really been interested in my HWM, just if I have a lot of empty space which the above would show you. More importantly is know that and how well space at the block level is being used (%FREE $USED). I think the suggestion about rebuilding the table online by moving it to another tablespace and then back again will be your best bet if you are 24/7 shop. Better check the docs on this but I am pretty sure you can do while the db is up, just pick a time with low activity. Sorry I can be more helpful, really in the weeds here today.

Thanks,
Ethan

-----Original Message-----
Sent: Friday, January 18, 2002 9:41 AM
To: Multiple recipients of list ORACLE-L

Ethan
The database is in production and users are accesing 24x7.What will be best approach to do?
DO u have any scripts how to find HWM?
Thanks
-Seema

>From: "Post, Ethan" <Ethan.Post_at_ps.net>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: SPACE FREE HOW?
>Date: Thu, 17 Jan 2002 14:25:37 -0800
>
>Deleting records from a table does not free up space in the database.
>Search for high water mark in the concepts manual and you should find an
>explanation of how this works. The statement below only frees up space
>above the high water mark on the table.
>
>You can...
>
>create table foo nologging as (select * from big_table);
>
>truncate table big_table;
>
>insert into big_table (select * from foo);
>
>drop table foo;
>
>
>-Ethan
>
>-----Original Message-----
>Sent: Thursday, January 17, 2002 3:27 PM
>To: Multiple recipients of list ORACLE-L
>
>
>ALTER TABLE table DEALLOCATE UNUSED KEEP integer;
>the keep clause is optional.
>
>-sunil
>
>-----Original Message-----
>Sent: Thursday, January 17, 2002 2:58 PM
>To: Multiple recipients of list ORACLE-L
>
>
>Hi
>I deleted millions of rows from diffrent tables and I have not seen any
>impact on database size.What I have to do to get that free space?
>Is it necessary to shutdown the database?
>Thx
>-Seema
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Post, Ethan
> INET: Ethan.Post_at_ps.net
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>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).



Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Seema Singh
  INET: oracledbam_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Post, Ethan
  INET: Ethan.Post_at_ps.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Fri Jan 18 2002 - 15:21:56 CST

Original text of this message

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