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: used segment space in bytes

RE: used segment space in bytes

From: Diego Cutrone <dcutrone_at_afip.gov.ar>
Date: Thu, 17 Jan 2002 11:08:50 -0800
Message-ID: <F001.003F301F.20020117102204@fatcity.com>

Hi Dieter:
    As you've said, you can use dbms_space
for this job.
This package tells you how many blocks has the object and where's the HWM. And if you use the dbms_space.free_blocks() procedure, it will also report how many blocks below the HWM are in the freelists.
    You can also use this query to

know how many blocks hold at least one row:
 

(ORACLE 7) SELECT COUNT(DISTINCT
SUBSTR(rowid,15,4)||SUBSTR(rowid,1,8)) FROM TABLE.
 
    You can easily change it to work in
Oracle 8 too by using the dbms_rowid package.
 

HTH
Greetings
Diego Cutrone
 

<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

  hi guys!
   
  what would be the easiest way to compute   the space
  in bytes used by a segment?
  it is rather easy to determine the # of   used blocks
  by a specific segment by looking at the   dba_extents
  for example. but how many blocks have been   really used
  in one of those extents. i guess i would   be able
  to compute the free blocks by using the   dbms_space
  package but it just seems to
  complicated.
  any hints ... ?
   
  thank you
   
  -do
  <SPAN
class=258400017-17012002>  Received on Thu Jan 17 2002 - 13:08:50 CST

Original text of this message

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