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: find allocated and used space for a table

RE: find allocated and used space for a table

From: Rajesh Dayal <Rajesh_at_ohitelecom.com>
Date: Mon, 11 Jun 2001 02:16:08 -0700
Message-ID: <F001.00323DD6.20010611015050@fatcity.com>

Hi,

The results from previous mail's query would differ( by 1) from following....

SELECT SUM(blocks) "Allocated Blocks"
 FROM dba_extents
 WHERE segment_name = '&&table_name'
/

The reason for this is that one block is reserved for the segment header. DBA_SEGMENTS.BLOCKS holds the total number of blocks allocated to the table. While DBA_TABLES.BLOCKS holds the total number of blocks allocated for data.

        And yes, the DBMS_SPACE package would return same values as that from DBA_TABLES.

HTH more..
Rajesh
-----Original Message-----
Sent: Monday, June 11, 2001 11:56 AM
To: 'ORACLE-L_at_fatcity.com'

If you can afford to analyze the Table(for latest statistics) then ....

  1. Analyze Table <tablename> compute statistics.
  2. select blocks "Used Blocks" , blocks + empty_blocks "Allocated Blocks" from dba_tables where table_name = 'tablename';

hth,
Rajesh

-----Original Message-----
Sent: Monday, June 11, 2001 11:56 AM
To: Multiple recipients of list ORACLE-L

Hi,

How to find allocated and used space for a table?

I required it urgently

Regds



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Soman Manoj
  INET: manojdsoman_at_yahoo.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: Rajesh Dayal
  INET: Rajesh_at_ohitelecom.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). Received on Mon Jun 11 2001 - 04:16:08 CDT

Original text of this message

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