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: Table Size

RE: Table Size

From: Thomas Day <tday6_at_csc.com>
Date: Fri, 17 Oct 2003 12:49:32 -0800
Message-ID: <F001.005D3822.20031017124932@fatcity.com>

SQL> @actual eid_roles

BYTES_USED



  30711808

SQL> select sum(bytes) from dba_segments where segment_name = 'EID_ROLES' SQL> / SUM(BYTES)



  34996224

The script reports the blocks (as determined by the rowid substring) that have live rows in them and multiplies it by the db_block size. It does not report blocks that have no rows and, presumably, are available for new data.

In your example, it would depend on how many rows per block. It could or could not return the same result. It returns the blocks with live data expressed as bytes.

                                                                                                                                       
                      "Mercadante,                                                                                                     
                      Thomas F"                To:      Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>                    
                      <NDATFM                  cc:                                                                                     
                      @labor.state.ny.         Subject: RE: Table Size                                                                 
                      us>                                                                                                              
                      Sent by:                                                                                                         
                      ml-errors                                                                                                        
                                                                                                                                       
                                                                                                                                       
                      10/16/2003 10:19                                                                                                 
                      AM                                                                                                               
                      Please respond                                                                                                   
                      to ORACLE-L                                                                                                      
                                                                                                                                       
                                                                                                                                       




Thomas,

All that this does is report the number of rows. It does not deal with any columns within the table. If I had two tables with the exact number of rows, but one table had 10 2K columns fully populated, and the other table had 10 1-char columns fully populated, this query would return the same result.

I'm not really sure what value this query has.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, October 15, 2003 4:49 PM To: Multiple recipients of list ORACLE-L

This will get you that actual bytes used by the data in the table; however, it will hit every row in the table and take a long time to run. It takes one parameter, the table being sized.

rem ****************************************************
rem this code was inspired by Kevin Loney
rem ****************************************************
set verify off;
set pages 24;
select COUNT(DISTINCT(SUBSTR(a.ROWID,1,16)))* b.value Bytes_Used from &&1 a,
v$parameter b where b.name = 'db_block_size' group by b.value /
                      "Pillai, Rajesh"

                      <Rajesh.Pillai           To:      Multiple recipients
of list ORACLE-L <ORACLE-L_at_fatcity.com>
                      @nordstrom.com>          cc:

                      Sent by:                 Subject: RE: Table Size

                      ml-errors





                      10/15/2003 04:19

                      PM

                      Please respond

                      to ORACLE-L









Allan,

I cannot run stats on the table

Regards,
Rajesh

      -----Original Message-----
      From: Nelson, Allan [mailto:anelson_at_midf.com]
      Sent: Wednesday, October 15, 2003 12:54 PM
      To: Multiple recipients of list ORACLE-L
      Subject: RE: Table Size

      If you are running stats on this table or can run stats use
      dba_segements

      Allan
            -----Original Message-----
            From: Pillai, Rajesh [mailto:Rajesh.Pillai_at_nordstrom.com]
            Sent: Wednesday, October 15, 2003 2:24 PM
            To: Multiple recipients of list ORACLE-L
            Subject: Table Size

            Hi All,
                Could somebody help me in finding the actual size of an
            oracle table in GB.

            TIA,
            Rajesh





____________________________________________________________________________

__

      This email is intended solely for the person or entity to which it is
      addressed and may contain confidential and/or privileged information.
      Copying, forwarding or distributing this message by persons or
      entities other than the addressee is prohibited. If you have received
      this email in error, please contact the sender immediately and delete
      the material from any computer. This email may have been monitored
      for policy compliance. [021216]








--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Thomas Day
  INET: tday6_at_csc.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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: NDATFM_at_labor.state.ny.us 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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Thomas Day INET: tday6_at_csc.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 Fri Oct 17 2003 - 15:49:32 CDT

Original text of this message

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